DISKRESCUE(1)

NAME
diskrescue - disk recovery tool

SYNOPSIS
diskrescue [-aqv] [-R results file] [-b block size] [-i in file] [-o out file] [-r raw device] operation

DESCRIPTION
diskrescue is a tool to verify, recover and restore as much data as possible from failed disks.

The idea is to read all sectors of a disk and let the disk reallocate bad or soon to be bad sectors. While the disk is being read it can clone the data to a file or a disk as well. The resulting disk/file can be checked with fsck(8) and analyzed with dumpfs(8) and fsdb(8) while not having to deal with a failing disk.

When a sector can not be read it will be filled with zeroes and diskrescue continues on to the next sector.

Alternatively, diskrescue can also restore an image onto a disk or other file.

For all intents and purposes this is a fancy dd(1) that takes some of the complexity out of dealing with a failed disk.

The options are as follows:

-R results file
    Write the results of the rescue process to the specified file. If the results file already exists the program will attempt to restart the recovery. Other parameters such as block size and out file can not be specified when attempting to restart a recovery.

-a  Abort on read error.

-b block size
    This is the block size that the disk uses to read and write data. A large value speeds things up and once a bad spot on the disk is hit diskrescue reverts to the natural block size of 512 bytes during the recovery process. Default is 512, which is very slow! The argument accepts the following quantifiers: b, k, m, g and the following multipliers: * and x. For example 1 mega byte can be expressed as: -b 1m or -b 1k*1k

-i in file
    This is the source file for the restore operation. One can not use raw device as the in file ; use the recover operation and the raw disk parameter instead.

-o out file or disk
    This is the target file or disk of the operation.

-q  Don't report completion percentage.

-r raw disk
    This is the raw disk device that will be attempted to be recovered. For example: /dev/rsd2c

-v  Print version number and exit.

operation
    verify
        The verify operation reads the entire disk and lets it do its thing to reallocate bad or questionable blocks. This operation can not be resumed if aborted.
    recover
        Essentially the same as verify but write the read data to a file or disk. This operation can be resumed if aborted provided there is a valid results file.
    restore
        Restore an image file to a disk or file. Restore can not be used to copy a raw device to a disk or file. This operation can not be resumed if aborted.

SEE ALSO
dd(1) fsck(8) dumpfs(8) fsdb(8)

HISTORY
diskrescue was written to recover a disk of a friend and it became useful enough for the general public.

AUTHORS
-nosplit

diskrescue was written by Marco Peereboom <marco@peereboom.us>.

EXAMPLES
Verify a disk and force it to reallocate bad blocks:

    diskrescue -b 1m -r /dev/rsd2c verify

Recover a disk to a file and write a results file:

    diskrescue -r /dev/rsd2c -R res -o disk.img -b 1m recover

Restart a recovery operation with a results file:

    diskrescue -r /dev/rsd2c -R res recover

Restore an image to a disk:

    diskrescue -b 1m -i disk.img -o /dev/rsd2c restore

DISCLAIMER
Use this at your own risk! Recovering disks can make them worse and the author takes no responsibility for any data loss or corruption. Also when used wrong a good disk could be overwritten permanently losing all data on it. Use this tool wisely and leave the author alone if you mess up.

BUGS
Lots of features are still missing.