Next: Invoking ddrescuelog, Previous: Generate mode, Up: Top [Index]
Ddrescuelog is a tool that manipulates ddrescue mapfiles, shows mapfile contents, converts mapfiles to/from other formats, compares mapfiles, tests rescue status, and can delete a mapfile if the rescue is done. Ddrescuelog operations can be restricted to one or several parts of the mapfile if the domain setting options are used.
When performing logic operations (AND, OR, XOR) on mapfiles of different extension, only the blocks present in both files are processed.
Here are some examples of how to use ddrescuelog, alone or in combination with other tools.
Example 1: Delete the mapfile if the rescue is finished (all data have been recovered without errors left).
ddrescue -f /dev/hda /dev/hdb mapfile ddrescuelog -d mapfile
Example 2: Rescue two ext2 partitions in /dev/hda to
/dev/hdb and repair the file systems using badblock lists generated with
ddrescuelog. File system block size is 4096.
Note: you do need to partition /dev/hdb beforehand.
fdisk /dev/hdb <-- partition /deb/hdb ddrescue -f /dev/hda1 /dev/hdb1 mapfile1 ddrescue -f /dev/hda2 /dev/hdb2 mapfile2 ddrescuelog -l- -b4096 mapfile1 > badblocks1 ddrescuelog -l- -b4096 mapfile2 > badblocks2 e2fsck -v -f -L badblocks1 /dev/hdb1 e2fsck -v -f -L badblocks2 /dev/hdb2
Example 3: Rescue a whole disc with two ext2 partitions in /dev/hda to
/dev/hdb and repair the file systems using badblock lists generated with
ddrescuelog. Disc sector size is 512, file system block size is 4096.
Arguments to options ‘-i’ and ‘-s’ are the starting positions
and sizes of the partitions being rescued.
Note: you don’t need to partition /dev/hdb beforehand, but if the
partition table on /dev/hda is damaged, you’ll need to recreate it
somehow on /dev/hdb.
ddrescue -f /dev/hda /dev/hdb mapfile fdisk /dev/hdb <-- get partition sizes ddrescuelog -l- -b512 -i63s -o0 -s767457s -b4096 mapfile > badblocks1 ddrescuelog -l- -b512 -i767520s -o0 -s96520s -b4096 mapfile > badblocks2 e2fsck -v -f -L badblocks1 /dev/hdb1 e2fsck -v -f -L badblocks2 /dev/hdb2
Next: Invoking ddrescuelog, Previous: Generate mode, Up: Top [Index]