[Borgbackup] Archive File Integrity Check Against Local File System

Thorsten Schöning tschoening at am-soft.de
Sat Dec 10 04:29:13 EST 2022


Guten Tag kevin.mccall--- via Borgbackup,
am Freitag, 9. Dezember 2022 um 22:20 schrieben Sie:

>  Does this borg check switch compare all the files in the archive
> to the local file system? Or does this performed at the block level?

Neither of both, BORG only checks that what it sees makes sense to
BORG itself. It assumes that data read during the backup is OK and not
corrupted, because that is taken care at the transport level from the
source disk over the source file system etc. to target file system and
disk.

>How is tar comparing these files with hashes or just ctime or mtime?

According to some docs, it doesn't compare file contents itself and
might not tell you about possibly missing files in the backup:

> The `--compare' (`-d') operation, as its name implies, causes tar to
> compare files and directories in the archive with their counterparts
> (files of the same name) in the file system, and report back
> differences in file size, mode, owner and modification date. When
> performing the `--compare' (`-d') operation, tar acts only on files
> actually in the archive--it will ignore files in the active file
> system that do not exist in the archive. If tar with `--compare'
> (`-d') specified is given, as a file name argument, the name of a
> file that does not exist in the archive, it will return an error
> message.

https://www.math.utah.edu/docs/info/tar_2.html#SEC15

> I look forward to learning how you verify your backups.

Most people simply don't and only have an occasional look if things
make somewhat sense every few months or years or ... :-) Remember that
your backed up data is a frozen point in time and to really compare
you would need to keep the source data at exactly that point in time.

Freezing data is mostly done using temporary snapshots, so you either
need to keep that as long as you want to verify, possibly occupying
storage space longer than necessary. Or you need to backup and verify
instantly afterwards, which includes reading and transferring all data
multiple times, hence larger backup times, but allows you to remove
the snapshots sooner.

So the default approach of all backup software I know of is to not
verify against source data, but rely on correctly working reads and
transfers and simply error out if some software reports errors during
such operations. Everything else is either not available at all or
optional and at least I didn't came accross that anyone uses such
features really often. Fast backup times, sooner freed temporary
snapshot storage etc. always became more important.

Mit freundlichen Grüßen

Thorsten Schöning

-- 
AM-SoFT IT-Service - Bitstore Hameln GmbH
Mitglied der Bitstore Gruppe - Ihr Full-Service-Dienstleister für IT und TK

E-Mail: Thorsten.Schoening at AM-SoFT.de
Web:    http://www.AM-SoFT.de/

Tel:   +49 5151-  9468- 0
Tel:   +49 5151-  9468-55
Mobil: +49  178-8 9468-04

AM-SoFT IT-Service - Bitstore Hameln GmbH, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 221853 - Geschäftsführer: Janine Galonska






More information about the Borgbackup mailing list