[Borgbackup] speeding up borg check

Sascha Ternes imperator at jedimail.de
Sat Apr 27 09:37:27 EDT 2019


Hi Thorsten,

I assume you're using the latest stable 1.1.9.

borg check running time heavily depends on the link between your 1 TB
file system and your backup space. If it is mounted locally or accessed
via ssh:/ over fast connection (and borg is running remotely), the check
will be much faster. If you only have a storage repo without borg
running on it, checking will be much slower.

Am 26.04.19 um 23:38 schrieb Thorsten von Eicken:
> I've read the docs on borg check 3 times and I'm still lost :-(... It
> says in detail what --archives-only and --repository-only do, but I
> don't know what that means...

In short:

--repository-only will do CRC and size checks of all data chunks in the
repo. It won't check the files in the archives.

--archives-only will check if for every file in every archive if the
chunk(s) are available in the repo.

> I'm backing up a ~1TB filesystem daily where almost nothing changes and
> I want to run a prune and a check after the create. The check currently
> takes 11 hours (slow disk & cpu).

Sounds normal, since you did a full check (both repo and archives) I
suppose. Doc says: "The archive checks can be time consuming, they can
be skipped using the --repository-only option."

> Ideally, what I'd like is for check to
> do the maximum number of verifications short of reading the whole TB. So
> check any indexes, directories, presence of files, etc. Just don't read
> the full TB to verify each bit, I'd do that explicitly once a week or
> once a month. Is this possible?

I think you don't need to check after every create, esp. if "amonst
nothing changes". You may check only the latest backup that was just
created, via --archives-only and "--last 1" options (see doc). Once in a
month you can run a full check, maybe just --repository-only.


More information about the Borgbackup mailing list