Command RR[N] - add data recovery record


Optionally, redundant information (recovery record) may be added to an archive, incurring a small penalty in archive size, which will help to recover archived files in the case of a diskette failure or other data losses.

A recovery record may contain up to 524288 recovery sectors. If the portion of the damaged data is continuous then each sector is able to recover 512 bytes of damaged information, although this value may decrease for multiple areas of damage.

The number of sectors may be specified directly in the "rr[N]" command (N = 1, 2 .. 524288). If it is not specified by the user, it will be selected automatically according to the archive size: a size of the recovery information will be about 1% of the total archive size, usually allowing the recovery of up to 0.6% of the total archive size of continuously damaged data.

You may also append <n> with the percent character to specify the recovery record size in percent to the archive size, for example, 'rar rr3% arcname'. Note that if you run this command from .bat or .cmd file, you need to use rr3%% instead of rr3%, because the command processor treats the single '%' character as start of batch file parameter. You may also use 'p' instead of '%', so 'rr3p' will work too.

The size of the recovery record may be approximately calculated as:

<archive size> / 256 + <number of recovery sectors> * 512 bytes.

This command is the command line equivalent of the archive management command Protect archive from damage.

Examples

  1. add a data recovery record of the default size (1%) to the archive backup

WinRAR rr backup

  1. add a data recovery record to the archive pictures and set its size to 5% of the total archive size

WinRAR rr5p pictures