par c(heck) [options] <par file> : Check parity archive par r(ecover) [options] <par file> : Restore missing volumes par a(dd) [options] <par file> [files] : Add files to parity archive Advanced: par m(ix) [options] : Try to restore from all parity files at once
Par uses Reed-Solomon coding to make multiple parity volumes from the same set of files.
What this means is that you can recover as many files as you have recovery volumes. Any recovery volumes for that set will do.
You are uploading a rar-archive, Archive.rar to a newsgroup, split into 40 files. You decide to make a parity archive with five recovery volumes:
People download your files, and the Archive.PAR file to check if they downloaded correctly. Someone runs par to check if he got all files:
>par check Archive.PAR
It reports that three files are missing, and he would need three parity volumes to recover them. He tries to download these, and he gets Archive.P02, .P04 and .P05. Then he runs par to recover those files:
>par recover Archive.PAR
His machine rattles for a minute or two, and all his files are restored.
$ par recover -m eBooks_collection.part139.par Checking eBooks_collection.part139.par eBooks_collection.part001.rar - OK eBooks_collection.part002.rar - OK eBooks_collection.part003.rar - OK ... eBooks_collection.part108.rar - OK ERROR: eBooks_collection.part109.rar: Failed md5 sum eBooks_collection.part109.rar - CORRUPT eBooks_collection.part110.rar - OK ERROR: eBooks_collection.part111.rar: Failed md5 sum eBooks_collection.part111.rar - CORRUPT eBooks_collection.part112.rar - OK ...
Restoring: Rename: eBooks_collection.part109.rar -> eBooks_collection.part109.rar.bad Rename: eBooks_collection.part111.rar -> eBooks_collection.part111.rar.bad 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100% eBooks_collection.part109.rar - RECOVERED eBooks_collection.part111.rar - RECOVERED
This version of par never overwrites an existing file. It can, however, move files out of the way (with the -m flag)
$ par recover eBooks_collection.part139.par Checking eBooks_collection.part139.par eBooks_collection.part001.rar - OK eBooks_collection.part002.rar - OK eBooks_collection.part003.rar - OK ... eBooks_collection.part108.rar - OK ERROR: eBooks_collection.part109.rar: Failed md5 sum eBooks_collection.part109.rar - CORRUPT eBooks_collection.part110.rar - OK ERROR: eBooks_collection.part111.rar: Failed md5 sum eBooks_collection.part111.rar - CORRUPT eBooks_collection.part112.rar - OK ...
Restoring: ERROR: eBooks_collection.part109.rar: File exists eBooks_collection.part109.rar - NOT RESTORED ERROR: eBooks_collection.part111.rar: File exists eBooks_collection.part111.rar - NOT RESTORED 0%100%