brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: borg check --verify-data re-verifies the actual data in your archives

Linux
~/tips/tip-backup-borg-check-verify-data

borg check --verify-data /path/to/repo

Verifies the stored data of your Borg archives instead of only their structure.

The default borg check verifies the consistency of a repository and its archives. If you want proof that the data itself is still correct, there is an option for that: --verify-data.

borg check --verify-data /path/to/repo

The docs describe it as a cryptographic archive data integrity verification. It belongs to the archive checks, so it conflicts with --repository-only. You can run the two halves of a check separately with --repository-only and --archives-only, which is useful when the repository check finishes quickly and the archive check takes the whole night.

To keep a run short, you can limit which archives are looked at, with a few options. --last 3 takes the last three archives after other filters, --first N does the same from the other end, and -a or --glob-archives matches archive names:

borg check --verify-data --last 3 /path/to/repo

Expect a verification run to take longer than a plain check, as it has to look at the stored data of the archives. On a repository reached over the network, think about the traffic before you start it from a laptop.

The most important caveat concerns --repair. The docs call it a potentially dangerous feature that might lead to data loss, and say it is highly recommended to make a backup of your repository before running in repair mode. So use check to find out whether there is a problem and stop there. If it reports errors, copy the repository first, then decide on a repair.

Further reading: Borg docs: borg check

More Linux tips a2query -m rewrite renice -n 10 -p 4242 cat config.yml | xsel -ib xvfb-run -a your-program --some-flag dpkg --get-selections > packages.txt All Linux tips (261) All topics

Link