Site hosted by Angelfire.com: Build your free website today!

Par2 : Adding recovery data
extra safety for archives



Back to:
MPC Tutorial
Lossless Tutorial

rev. 2.00

Creating par2 for a lot subdirectories
How To set par2 to idle mode

Adding par2 files to your albums, directories is an action to improve the safety of your storing, archiving.
It makes sense for storing on HD, on DVD+-R, even on CD-R.
An example: CD's or DVD's can lose their quality by aging, due to corrosion, oxidation of the organic layer, which contains the burned pits 'n' holes, bits and bytes.
HDs are a magnetical storage device. The magnetization gets weaker during time. HDs can age, and suddenly, you suffer from data losses and corrupt files. It is a very good idea and protection, to create par2 data for HD directories to protect your data, this is valid not only for music archiving !
So, if some bits of the data are lost and you have created before ! that accident par2 archive files, recovery data, you can restore, recover the lost data !
This is possible up to the amount, percentage of created par2 recovery data, like 5% - 15%, or whatever percentage of recovery data (-r) you have chosen, preselected in settings, commandline.
Another parameter is the selected block size (-s). All files of one directory are treated as 'one big file'. This virtual file is divided into a lot virtual small blocks. The smaller the blocks ( = the higher the block count, total number of blocks), the higher the efficiency and probability to restore 100% (of the % of amount of par2 data) of your lost data in worst case scenario.
The technical explanations how it works in detail would be too long for this guide. So, here is the How To:

1. Recovery data for 1 directory: QuickPar

If you want to create par2 recovery data only for one directory (album), then QuickPar with an easy GUI (Graphical User Interface) is recommended. If you have linked it with *.par2 files, then it is a good check-tool, too, if you want to check a single directory for its healthyness by clicking on the included par2 file.


2. Recovery data for a lot directories:

Until now, QuickPar is not able to create par2 files for sub-directories treating each sub-directory as single directory (album).

But here is an easy 1 step solution:

Get par2commandline 0.3 ak compile or older official 0.2 compile.
Or check Sourceforge for updates and don't use too much bandwidth capacity of this Guide's host, angelfire:
http://parchive.sourceforge.net/ or directly here:
official 0.2 compile from SourceForge
Get Case's sweep here, or directly from Case's page.

Install:
Ensure, that sweep.exe and par2.exe (0.3 or 0.2, the commandline version mentioned above) are in your path directory: c:/windows/system32/ (as example, see equivalent for your OS).
If they are not already there, copy them.

Usage:
Start the DOS-box, the commandline tool, which is delivered with every Windows OS. (You find it in Start -> Programs -> Tools/Utilities, nearby the other standard Windows simple programs like Paint, Editor or WordPad)
Like described in live picture above, browse to your desired main par2-working directory.
Necessary Commands:
f: == change drive to letter, this example f.
cd.. == 1 directory up
cd "f:\my music\par2-in-work\" == change directory to specified example.

Then copy & paste (right-mouse-click) or type in manually one commandline with your desired parameters according to following examples:
sweep par2 c -r6 -n1 -s40000 par2file *.*
sweep par2 c -r15 -n1 -s70000 par2file *.*

This a typical line, which works well on slow PC's like P3 @ 800 MHz for creating 15% par2 recovery data to fit on 1 DVD+/-R, 3.8 GB (data organized in subdirectories = albums) + 15% recovery data = 4.37 GB = 4481 MB = 4.7 Gb. So, for creating 15% data of 3.7 - 3.8 GB with a blocksize of 70 kB, a slow PC computes between 3 - 6 hours, dependent on other tasks running. Another good line for slow PCs would be the one with 6% par2 data and smaller blocksize, 40000, which will be faster than the 15% & 70000 commandline. You should adjust & optimize this line to your task & PC system. Here are explanations, what you can tweak:

-r15 = -rx : 15% redundancy, x is variable, select between 5 - 15 %
-s70000 = -sx : block size = 70000, x is variable, adjust to your needs.

-n1 = -nx : 1 par2 file is the result, you could select how many par2files are created by x, or you can leave -n option away. -n does not affect the recovery quality. You could adjust r, n, s to your needs.

r & s influence the recovery quality/computing time.
time = const. * -r% * 1/-s
Time is proportional to : redundancy_% * smaller_blocksize
Examples: * Creating 15% recovery data needs twice the time as creating only 7.5%.
* A block size of 200000 B needs only half of the time as a block size of 100000 B.

Recovering of data is even possible, if e.g. the 'head' information like table of content of a CD-R or HD is damaged. With tools like IsoBuster or daemon tool, you can extract the damaged data, mount it, and let QuickPar or commandline run.
At www.hydrogenaudio.org you find a thread about par2, which is more in detail, also the included readme of QuickPar or the commandline versions.

Here you see par2 directly after starting and here par2 running in DOS-box after finishing 2.4% of a directory.

Par2 needs all cpu power your PC can offer and this happens for some time, maybe hours. So it is a good idea to work with something different at your PC while par2 runs in background. For the reason, that your other work is not lagged down by par2 eating all your cpu power, you should set par2 & sweep to low priority, down to idle.

How To set par2 to idle mode:
1. Start Windows Task Manager by pressing the 3 keys Ctrl (Strg) / Alt / Del at same time.

2. Go to second tab, where all tasks are shown.

3. With mouse-right-click on sweep.exe -> select priority -> idle , you set sweep to idle. This is important, as otherwise sweep would set par2.exe to higher priority again, after current directory finished.

4. With mouse-right-click on par2.exe -> select priority -> idle , you set par2.exe to idle.

Back to:
MPC Tutorial
Lossless Tutorial