par2

creates and uses PAR2 files for data recovery

TLDR

Create recovery files
$ par2 create [backup.par2] [files]
Verify files
$ par2 verify [backup.par2]
Repair damaged files
$ par2 repair [backup.par2]
Create with redundancy level
$ par2 create -r[10] [backup.par2] [files]
Create with specific block count
$ par2 create -c[100] [backup.par2] [files]
Verify specific files
$ par2 verify [backup.par2] [file1] [file2]
Quiet operation
$ par2 create -q [backup.par2] [files]

SYNOPSIS

par2 [create] [verify] [repair] [-r percent] [-c count] [options] par2file [files]

DESCRIPTION

par2 creates and uses PAR2 (Parity Archive 2) files for data recovery. These files enable repairing damaged or missing data.Recovery files contain parity information calculated from source files. If source files become corrupted or partially lost, PAR2 files can reconstruct the original data.Redundancy level (-r) controls how much damage can be repaired. 10% redundancy means 10% of data can be lost and still be recovered. Higher redundancy uses more space.Block-based recovery splits files into blocks. Damage to part of a file only consumes recovery capacity for affected blocks, not the entire file.Verification checks files against stored checksums, identifying corruption without repairing. Repair mode uses available recovery data to fix problems.The format is commonly used for Usenet downloads, archive distribution, and backup verification.

PARAMETERS

create

Create PAR2 recovery files.
verify, v
Verify files using PAR2.
repair, r
Repair damaged files.
-r PERCENT
Redundancy percentage.
-c COUNT
Block count.
-b SIZE
Block size in bytes.
-n COUNT
Number of recovery files.
-u
Uniform recovery file sizes.
-q
Quiet mode.
-v
Verbose output.
--
End of options.

INSTALL

sudo apt install par2
sudo dnf install par2cmdline
sudo pacman -S par2cmdline
sudo apk add par2cmdline
sudo zypper install par2cmdline
brew install par2
nix profile install nixpkgs#par2cmdline

CAVEATS

Recovery requires enough PAR2 data for damage level. Cannot repair if damage exceeds redundancy. Large files need significant time and memory.

HISTORY

PAR2 was developed around 2003 as an improvement over the original PAR format. It uses Reed-Solomon error correction for block-level recovery. The format became standard for data recovery in file sharing and archival.

SEE ALSO

rzip(1), gzip(1), rar(1)