1par2(1)                      Parity archive utils                      par2(1)
2
3
4

NAME

6       par2 - PAR 2.0 compatible file verification and repair tool.
7

SYNOPSIS

9       par2 c|v|r [options] <PAR2 file> [files]
10
11       par2 c(reate) [options] <PAR2 file> [files]
12       par2 v(erify) [options] <PAR2 file> [files]
13       par2 r(epair) [options] <PAR2 file> [files]
14
15       Also:
16       par2create [options] <PAR2 file> [files]
17       par2verify [options] <PAR2 file> [files]
18       par2repair [options] <PAR2 file> [files]
19

DESCRIPTION

21       par2cmdline  is  a  program for creating and using PAR2 files to detect
22       damage in data files and repair them if necessary. It can be used  with
23       any kind of file.
24

OPTIONS

26       -h     Show this help
27
28       -V     Show version
29
30       -VV    Show version and copyright
31
32       -a <file>
33              Set the main PAR2 archive name; required on create, optional for
34              verify and repair
35
36       -b<n>  Set the Block‐Count
37
38       -s<n>  Set the Block‐Size (don't use both -b and -s)
39
40
41       -r<n>  Level of redundancy (percentage)
42
43       -r<c><n>
44              Redundancy target size, <c>=g(iga),m(ega),k(ilo) bytes
45
46       -c<n>  Recovery block count (don't use both -r and -c)
47
48       -f<n>  First Recovery‐Block‐Number
49
50       -u     Uniform recovery file sizes
51
52       -l     Limit size of recovery files (don't use both -u and -l)
53
54       -n<n>  Number of recovery files (don't use both -n and -l)
55
56       -m<n>  Memory (in MB) to use
57
58       -t<n>  Number of threads used for main processing (auto-detected)
59
60       -T<n>  Number of files hashed in parallel (during file verification and
61              creation stages, 2 default)
62
63       -v [-v]
64              Be more verbose
65
66       -q [-q]
67              Be more quiet (-qq gives silence)
68
69       -p     Purge  backup files and par files on successful recovery or when
70              no recovery is needed
71
72       -R     Recurse into subdirectories (only useful on create)
73
74       -N     data skipping (find badly mispositioned data blocks)
75
76       -S<n>  Skip leaway (distance +/- from expected block position)
77
78       -B<path>
79              Set the basepath to use as reference for the datafiles
80
81       --     Treat all following arguments as filenames
82

EXAMPLES

84       With PAR 2.0 you can create PAR2 recovery files for as few as 1  or  as
85       many  as 32768 files. If you wanted to create PAR1 recovery files for a
86       single file you are forced to split the file into muliple parts and RAR
87       is  frequently  used  for  this purpose. You do NOT need to split files
88       with PAR 2.0.
89
90       To create PAR 2 recovery files for a single data file (e.g. one  called
91       test.mpg), you can use the following command:
92
93         par2 create test.mpg
94
95       If  test.mpg is an 800 MB file, then this will create a total of 8 PAR2
96       files with the following filenames (taking roughly 6 minutes  on  a  PC
97       with a 1500MHz CPU):
98
99         test.mpg.par2      - This is an index file for verification only
100         test.mpg.vol00+01.par2 - Recovery file with 1 recovery block
101         test.mpg.vol01+02.par2 - Recovery file with 2 recovery blocks
102         test.mpg.vol03+04.par2 - Recovery file with 4 recovery blocks
103         test.mpg.vol07+08.par2 - Recovery file with 8 recovery blocks
104         test.mpg.vol15+16.par2 - Recovery file with 16 recovery blocks
105         test.mpg.vol31+32.par2 - Recovery file with 32 recovery blocks
106         test.mpg.vol63+37.par2 - Recovery file with 37 recovery blocks
107
108       The  test.mpg.par2  file  is  39 KB in size and the other files vary in
109       size from 443 KB to 15 MB. These par2 files will enable the recovery of
110       up to 100 errors totalling 40 MB of lost or damaged data from the orig‐
111       inal test.mpg file when it and the par2 files  are  posted  on  UseNet.
112       When  posting  on UseNet it is recommended that you use the "-s" option
113       to set a blocksize that is equal to the Article size that you will  use
114       to post the data file. If you wanted to post the test.mpg file using an
115       article size of 300 KB then the command you would type is:
116
117         par2 create -s307200 test.mpg
118
119       This will create 9 PAR2 files instead of 8, and they will be capable of
120       correcting  up  to  134  errors totalling 40 MB. It will take roughly 8
121       minutes to create the recovery files this time. In both  of  these  two
122       examples,  the total quantity of recovery data created was 40 MB (which
123       is 5% of 800 MB). If you wish to create a greater or lesser quantity of
124       recovery data, you can use the "-r" option. To create 10% recovery data
125       instead of the default of 5% and also to use a block size  of  300  KB,
126       you would use the following command:
127
128         par2 create -s307200 -r10 test.mpg
129
130       This  would also create 9 PAR2 files, but they would be able to correct
131       up to 269 errors totalling 80 MB. Since twice as much recovery data  is
132       created, it will take about 16 minutes to do so with a 1500MHz CPU. The
133       "-u" and "-n" options can be used to control exactly how many  recovery
134       files  are created and how the recovery blocks are distributed amoungst
135       them. They do not affect the total quantity of recovery  data  created.
136       The  "-f" option is used when you create additional recovery data. e.g.
137       If you have already created 10% and want another 5% then you  migh  use
138       the following command:
139
140         par2 create -s307200 -r5 -f300 test.mpg
141
142       This  specifies  the  same block size (which is a requirement for addi‐
143       tional recovery files), 5% recovery data, and a first block  number  of
144       300.
145
146       The  "-m"  option controls how much memory par2 uses. It defaults to 16
147       MB unless you override it.
148
149       CREATING PAR2 FILES FOR MULTIPLE DATA FILES
150
151       When creating PAR2 recovery files form multiple data  files,  you  must
152       specify  the  base  filename to use for the par2 files and the names of
153       all of the data files. If test.mpg had been  split  into  multiple  RAR
154       files, then you could use:
155
156         par2 create test.mpg.rar.par2 test.mpg.part*.rar
157
158       The  files  filename  "test.mpg.rar.par2"  says  what you want the par2
159       files to be called and "test.mpg.part*.rar" should select  all  of  the
160       RAR files.
161
162       VERIFYING AND REPAIRING
163
164       When  using par2 recovery files to verify or repair the data files from
165       which they were created, you only need to specify the filename  of  one
166       of the par2 files to par2. For example:
167
168         par2 verify test.mpg.par2
169
170       This  tells  par2 to use the information in test.mpg.par2 to verify the
171       data files. Par2 will automatically search for  the  other  par2  files
172       that were created and use the information they contain to determine the
173       filenames of the original data files and then to verify them.   If  all
174       of the data files are ok, then par2 will report that repair will not be
175       required. If any of the data files are missing or  damaged,  par2  will
176       report  the details of what it has found. If the recovery files contain
177       enough recovery blocks to repair the damage,  you  will  be  told  that
178       repair  is possible. Otherwise you will be told exactly how many recov‐
179       ery blocks will be required in order to repair. To carry out  a  repair
180       use the following command:
181
182         par2 repair test.mpg.par2
183
184       This tells par2 to verify and if possible repair any damaged or missing
185       files. If a repair is carried out, then each  file  which  is  repaired
186       will be re-verified to confirm that the repair was successful.
187
188       MISSNAMED AND INCOMPLETE DATA FILES
189
190       If  any  of  the  recovery files or data files have the wrong filename,
191       then par2 will not automatically find and scan them. To have par2  scan
192       such  files,  you must include them on the command line when attempting
193       to verify or repair; e.g.:
194
195         par2 r test.mpg.par2 other.mpg
196
197       This tells par2 to scan the file called other.mpg to see if it contains
198       any  data  belonging  to  the  original data files. If one of the extra
199       files specified in this way is an exact match for a data file, then the
200       repair  process  will  rename the file so that it has the correct file‐
201       name. Because par2 is designed to be able to find good  data  within  a
202       damaged  file, it can do the same with incomplete files downloaded from
203       UseNet. If some of the articles for a  file  are  missing,  you  should
204       still download the file and save it to disk for par2 to scan. If you do
205       this then you may find that you can carry out a repair in  a  situation
206       where  you  would  not otherwise have sufficient recovery data. You can
207       have par2 scan all files that are in the current directory using a com‐
208       mand such as:
209
210         par2 r test.mpg.par2 *
211
212       WHAT TO DO WHEN YOU ARE TOLD YOU NEED MORE RECOVERY BLOCKS
213
214       If  par2  determines  that any of the data files are damaged or missing
215       and finds that there is insufficient recovery data to effect a  repair,
216       you will be told that you need a certain number of recovery blocks. You
217       can obtain these by downloading additional recovery files. In order  to
218       make  things  easy, par2 files have filenames that tell you exactly how
219       many recovery blocks each one contains.  Assuming  that  the  following
220       command was used to create recovery data:
221
222         par2 c -b1000 -r5 test.mpg
223
224       Then the recovery files that are created would be called:
225
226         test.mpg.par2
227         test.mpg.vol00+01.par2
228         test.mpg.vol01+02.par2
229         test.mpg.vol03+04.par2
230         test.mpg.vol07+08.par2
231         test.mpg.vol15+16.par2
232         test.mpg.vol31+19.par2
233
234       The first file in this list does not contain any recovery data, it only
235       contains information sufficient to verify the data files. Each  of  the
236       other  files contains a different number of recovery blocks. The number
237       after the '+' sign is the number of recovery blocks and the number pre‐
238       ceding  the '+' sign is the block number of the first recovery block in
239       that file. If par2 told you that you needed 10  recovery  blocks,  then
240       you  would  need  "test.mpg.vol01+02.par2" and "test.mpg.vol07+08.par".
241       You might of course choose to  fetch  "test.mpg.vol15+16.par2"  instead
242       (in  which  case  you would have an extra 6 recovery blocks which would
243       not be used for the repair).
244
245       HASHING
246
247       Hashing portion (file verification and creation  stages)  of  the  code
248       can't be parallelized without processing multiple files simultaneously.
249       The 2 file/thread default is a good choice for HDDs, using more threads
250       can  result  in worse performance. Four or more threads can be used for
251       better performance with SSDs.
252
253

AUTHORS

255       Peter Brian Clements <peterbclements@users.sourceforge.net>
256       Marcel Partap <mpartap@gmx.net>
257       Ike Devolder <ike.devolder@gmail.com>
258       Jussi Kansanen <jussi.kansanen@gmail.com>
259
260
261
262
2630.8.0                              june 2017                           par2(1)
Impressum