Settings

Theme

Ask HN: How do you verify backups?

4 points by kaptain 3 years ago · 4 comments (3 loaded) · 1 min read

Reader

I have a versioned backup system using a combination of Time Machine (locally) and Arq+B2 (remote) over two laptops. I've done spot checks to verify that my backups aren't corrupted but I can't figure out how users are supposed to verify their backups aren't corrupted. How do people do this? I'm asking this question in a personal context but I would be curious to know what an enterprise/business context looks like too.

369548684892826 3 years ago

I use rsync to generate and compare checksums of the original against the backup:

    rsync -cavin --info=name2 --no-perms --no-owner --no-group /local/data/path/ user@host:/remote/data/path/ | grep -e '<' -e '>'
grep finds difference markers in the output.

-c for checksum generation.

-n for dry-run mode so rsync doesn't transmit files.

ttgurney 3 years ago

In my own personal use-case: my backups include a file that contains a list of every file that is backed up and each file's xxhash.[1] So verification is as simple as running "xxhsum --check" on this file. This is a bit slow, but it's much faster than something like SHA-256. And I don't know what scheme would be significantly faster. I just threw this together to solve my problem of verifying backups, without doing much research into the problem.

The backup is to physical media so that makes this scheme easy. Don't know if or how this could be applied to online backups.

[1]: https://cyan4973.github.io/xxHash/

stop50 3 years ago

The only real test is to restore and verify. some systems allow mounting an backup, this could be an middle way.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection