Parchive / par2cmdline

Official repo for par2cmdline and libpar2
http://parchive.sourceforge.net
GNU General Public License v2.0
726 stars 75 forks source link

Recover impossible without a .par2 "main" file? #157

Closed apalazzi closed 3 years ago

apalazzi commented 3 years ago

I'm doing some experiments to recover my files (see #156 ) and I can't find a way to start the process without the "main" .par2 file, which in my case woulb be the Full-0005.par2 file:

andrea@atlante:~/par2-verify$ ls -l
totale 20789667
-rw-r--r-- 1 andrea andrea 19327343417  7 gen 08.48 Full-0005
-rw-r--r-- 1 andrea andrea       40408 27 nov  2017 Full-0005.par2
-rw-r--r-- 1 andrea andrea     9704148 27 nov  2017 Full-0005.vol000+001.par2
-rw-r--r-- 1 andrea andrea    19408192 27 nov  2017 Full-0005.vol001+002.par2
-rw-r--r-- 1 andrea andrea    38775976 27 nov  2017 Full-0005.vol003+004.par2
-rw-r--r-- 1 andrea andrea    77471240 27 nov  2017 Full-0005.vol007+008.par2
-rw-r--r-- 1 andrea andrea   154821464 27 nov  2017 Full-0005.vol015+016.par2
-rw-r--r-- 1 andrea andrea   309481608 27 nov  2017 Full-0005.vol031+032.par2
-rw-r--r-- 1 andrea andrea   618761592 27 nov  2017 Full-0005.vol063+064.par2
-rw-r--r-- 1 andrea andrea  1237281256 27 nov  2017 Full-0005.vol127+128.par2
-rw-r--r-- 1 andrea andrea  2474280280 27 nov  2017 Full-0005.vol255+256.par2
-rw-r--r-- 1 andrea andrea   638089072 27 nov  2017 Full-0005.vol511+066.par2

Is there a way to start the recovery process without this file? Or is that file absolutely necessary for the recovery process and recovery cannot be done without it? If it's the latter I think it should be clearly stated somewhere in the documentation, since it means that if this single file is corrupted then the whole redundant data is useless and recovery is impossible.

apalazzi commented 3 years ago

Ok, after stepping through the program with a debugger I've found that if you specify the data file on the command line (e.g. Full-0005) it looks for Full-0005.par or .par2 to determine the format (par1 or par2) but not for Full-0005.vol000+001.par2; so if the file Full-0005.par2 doesn't exist it exit. You have to specify an existing .par2 file with the .volXXX+YYY.par2 extension.

mdnahas commented 3 years ago

The data for recovery should be part of every par2 file. I can agree that the command-line options to par2cmdline are not very good and I hope we can improve them in a later version.

wdhwg001 commented 2 years ago

In my case yes it's totally possible - you may copy and rename one of the volume file back to .par2 and it will just work as long as you have enough blocks.