Skip to content

Instantly share code, notes, and snippets.

@dteoh dteoh/par_checksum.md
Last active Feb 1, 2017

Embed
What would you like to do?
Checksumming backups

par2 is not just for checksumming and recovering Usenet binaries, you can use it for your backups as well.

In my case, I wanted to make sure my RAW and JPG files don't get corrupted by bitrot.

Generating the checksum:

$ cd /the/directory/where/files/are/kept
$ par2 c something.par2 *
$ shasum -a 256 * > shasum256.txt

By default, the checksum files can recover up to 5% of data corruption.

To increase the amount of recovery data, for example by 20%:

$ par2 c -r20 something.par2 *

Verifying the files:

$ cd /the/directory/where/files/are/kept
$ shasum -a 256 -c shasum256.txt
$ par2 v something.par2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.