Here's an example.
1. Create a minimal recovery set for some file.
Code:
$ cp 20200903_055944.mp4 dummy.mp4
$ par2create -c1 p2c_test1.par2 dummy.mp4
Block size: 85456
Source file count: 1
Source block count: 2000
Recovery block count: 1
Recovery file count: 1
Opening: dummy.mp4
Computing Reed Solomon matrix.
Constructing: done.
Wrote 85456 bytes to disk
Writing recovery packets
Writing verification packets
Done
2. Some major league bit-rot. This could be anywhere within the file, not necessarily contiguous damage either.
Code:
$ dd if=/dev/urandom of=dummy.mp4 count=100 conv=notrunc
100+0 records in
100+0 records out
51200 bytes (51 kB, 50 KiB) copied, 0.00818186 s, 6.3 MB/s
3. Check it.
Code:
$ par2verify p2c_test1.par2
Loading "p2c_test1.par2".
Loaded 4 new packets
Loading "p2c_test1.vol0+1.par2".
Loaded 1 new packets including 1 recovery blocks
Loading "p2c_test1.par2".
No new packets found
There are 1 recoverable files and 0 other files.
The block size used was 85456 bytes.
There are a total of 2000 data blocks.
The total size of the data files is 170905919 bytes.
Verifying source files:
Target: "dummy.mp4" - damaged. Found 1999 of 2000 data blocks.
85328 bytes of data were skipped whilst scanning.
If there are not enough blocks found to repair: try again with the -N option.
Scanning extra files:
Repair is required.
1 file(s) exist but are damaged.
You have 1999 out of 2000 data blocks available.
You have 1 recovery blocks available.
Repair is possible.
1 recovery blocks will be used to repair.
4. Fix it.
Code:
$ par2repair p2c_test1.par2
Loading "p2c_test1.par2".
Loaded 4 new packets
Loading "p2c_test1.vol0+1.par2".
Loaded 1 new packets including 1 recovery blocks
Loading "p2c_test1.par2".
No new packets found
There are 1 recoverable files and 0 other files.
The block size used was 85456 bytes.
There are a total of 2000 data blocks.
The total size of the data files is 170905919 bytes.
Verifying source files:
Target: "dummy.mp4" - damaged. Found 1999 of 2000 data blocks.
85328 bytes of data were skipped whilst scanning.
If there are not enough blocks found to repair: try again with the -N option.
Scanning extra files:
Repair is required.
1 file(s) exist but are damaged.
You have 1999 out of 2000 data blocks available.
You have 1 recovery blocks available.
Repair is possible.
1 recovery blocks will be used to repair.
Computing Reed Solomon matrix.
Constructing: done.
Solving: done.
Wrote 170905919 bytes to disk
Verifying repaired files:
Target: "dummy.mp4" - found.
Repair complete.
$ sha1sum 20200903_055944.mp4 dummy.mp4
1b97ee7b451f551e663f80bdda8627f87a9d03bc 20200903_055944.mp4
1b97ee7b451f551e663f80bdda8627f87a9d03bc dummy.mp4
> To me, Parchive resembles the way a RAID array works. Is that likely to offer what I'm after? I'm not sure.
Each addition raises the bar on failures that eventually result in data loss.
I suppose it's where you choose to draw the line.
> [I keep one master collection and two full copies on different discs.]
Please tell me all 3 copies are not in your house.
If you're going to this much trouble, one of them has to be off-site at all times.
It doesn't matter how many copies you have if your house burns down.
A nearby relative's is probably fine, unless city killer asteroids are in your threat model.
Society is a mess, but hey, my music collection is safe.