Skip to content
experience

I test restore my backup for the first time in 2 year. 2 of 5 things was broken

October 8, 2026 · 3 min read

After greybeard_graham's tweet ("a backup you have never restored is a rumour") I feel personally attacked, so last weekend I finally do a real restore test. Not "I see the files in B2", a real restore to a new VM, start the apps, use them. Result: 3 OK, 2 broken. Nothing was lost because the originals are fine, but if the NAS died last month, I would lose all my scanned documents. Here is the story.

The setup

restic from the TrueNAS host to Backblaze B2, every night by cron, for 5 things: Immich (photos + DB), Vaultwarden, Paperless-ngx, Home Assistant, Gitea. ~1.4TB, about 8-9 USD a month on B2.

restic -r b2:hieu-backup:/tank backup /tank/apps /tank/photos \
  --exclude-file=/root/restic-excludes.txt
restic -r b2:hieu-backup:/tank forget \
  --keep-daily 7 --keep-weekly 4 --keep-monthly 12 --prune

Restore test

New Debian VM on pve3, install Docker, then:

restic -r b2:hieu-backup:/tank restore latest \
  --target /restore-test --include /tank/apps/vaultwarden

One by one for each app, then start it with the same compose file.

Broken #1: Immich database

The photos were there. But I was backing up the Postgres data directory while Postgres was running. Restore, start, Postgres complain and recover, then albums and face groups were half wrong. A file copy of a live database is not a backup, it is a random snapshot of files in the middle of being written.

Fix: dump first, then back up the dump.

docker exec -t immich_postgres pg_dumpall -c -U postgres \
  | gzip > /tank/backup/immich-db.sql.gz

Same for Vaultwarden, which is SQLite. That one was OK only because I already use the SQLite backup command:

sqlite3 /tank/apps/vaultwarden/db.sqlite3 ".backup '/tank/backup/vw.sqlite3'"

Broken #2: Paperless had NO documents

This one make me cold. Restore, start Paperless, log in, 2,300 documents in the list, click one: file not found. Click another: file not found.

My exclude file had this line, to skip the Jellyfin movies:

media/

And Paperless store all the documents in... /tank/apps/paperless/media/. For 2 years, my "backup" of Paperless was only the database. Every tax paper, every contract, the house papers, all scanned and the paper version shredded. Only on one NAS.

Fix: exclude with full path, never a bare name.

/tank/media/movies
/tank/media/tv

What I do now

  • restic check --read-data-subset=5% every week. It download and verify a different 5% of the data each time
  • Restore test every 3 months, in the calendar, to a different machine. Start the app, open 5 random items
  • Every exclude is a full path
  • Databases: dump first, always
  • The restic password: it was in Vaultwarden. Which is inside the backup. Which need the restic password to restore. Now it is printed on paper, in an envelope, at my mother's house

Please, test your restore this month. Not "check the files are there". Restore and open them.

Get the best of #self_hosted weekly

One email each Monday with the most useful posts. No spam; unsubscribe in one click.

Comments

12

Sign in to join the conversation.

Sign in to comment
Bikash Kalita@bikash_from_ghy#4 in Self Hosted
Paperless is exactly where I keep my rent agreement and tax papers. Checking my excludes right now, during work hours, sorry Berlin
6 net votes
Matt O'Brien@pi_tinker_matt#4 in Self Hosted
Gave me a cold sweat reading the Paperless bit. Testing mine this weekend, cheers Hieu
6 net votes
Alasdair Reid@onprem_or_die#3 in Self Hosted
the bare "media/" exclude is a classic. i did the same thing with "cache" in 2014 and excluded a directory called cache that held a client's entire product image library. found out when they asked for a restore. aye. three more for the list: 1. 3-2-1. three copies, two kinds of media, one offsite. B2 is your offsite, the NAS is copy one, get a cheap usb disk for copy two and rotate it 2. one copy should be something ransomware cannot delete. B2 has object lock, use it, or at least an app key that can't delete 3. write the restore steps down. on paper. the person restoring might be your wife, and she won't have your bash history
10 net votes
Nguyễn Minh Hiếu@homelab_hieu#1 in Self Hosted
the app key that cannot delete, I don't have it. doing it tonight. thank you
5 net votes
Graham Whitfield@greybeard_graham#2 in Self Hosted
Rumour confirmed, and well done for checking. Most people never do, and find out on the worst day of their year. The restic password inside the backup it protects is a classic. Envelope at your mother's house is exactly what we did with the root passwords in 1998, except the envelope was in the company safe. Cheers, G.
9 net votes
Prashanth Gowda@prashanth_sre#8 in Self Hosted
restore drills at my company are quarterly and they still fail about one in three. the backup ran green every night. this post is real life guru
7 net votes
Lindiwe Mokoena@loadshedding_lindi#4 in Self Hosted
Saving this. The "start the app and open 5 random items" step is the bit that turns a backup check into a restore test
8 net votes
Chaminda Perera@chaminda_sysops#4 in Self Hosted
In the bank the auditors demand restore evidence every quarter, with screenshots of the restored system working. We all complained for years. Then one day we needed it. Now I am the one demanding it.
7 net votes
Wolfgang Engel@dsgvo_wolf#9 in Self Hosted
The password loop is the best part of this post because almost everyone has it. Second thing to check: if the B2 credentials are also only in Vaultwarden, the envelope needs those too.
7 net votes
Nguyễn Minh Hiếu@homelab_hieu#1 in Self Hosted
...the envelope now has 2 pages :D
3 net votes
Karl Lindqvist@kernel_karl2 rep in Self Hosted
pg_dump. Always. A filesystem copy of a running database is not a backup.
9 net votes
Trần Phương Thảo@thao_qa2 rep in Self Hosted
this is why backup also need test case 🐞 QA mindset: "it ran without error" is not the same as "it did what we want". very good post anh
5 net votes