manpagez: man pages & more
info ddrescue
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3. Invoking ddrescue

The format for running ddrescue is:

 
ddrescue [options] infile outfile [logfile]

ddrescue supports the following options:

--help
-h

Print an informative help message describing the options and exit.

--version
-V

Print the version number of ddrescue on the standard output and exit.

--block-size=bytes
-b bytes

Hardware block size of input device in bytes (usually 512 for hard discs and 3.5" floppies, 1024 for 5.25" floppies, and 2048 for cdroms). Defaults to 512.

--binary-prefixes
-B

Show units with binary prefixes (powers of 1024).
SI prefixes (powers of 1000) are used by default. (See table below).

--cluster-size=blocks
-c blocks

Number of hardware blocks (sectors) to copy at a time. Defaults to 64KiB / hardware_block_size. Try smaller values for slow drives. The number of sectors per track (18 or 9) is a good value for floppies.

--complete-only
-C

Limit rescue domain to the blocks of finite size read from logfile. Do not read new data beyond logfile limits. This is useful when reading from devices of undefined size, like raw devices.

--direct
-d

Use direct disc access to read the input file, bypassing the kernel cache. Hardware block size must be correctly set for this to work. Not all systems support this.

--synchronous
-D

Use synchronous writes for output file. May be useful when forcing the drive to remap its bad sectors.

--max-errors=n
-e n

Maximum number of error areas allowed before giving up. Defaults to infinity.

--fill=types
-F types

Fill the output file areas specified as any of types in the logfile, with data read from the input file. types contains one or more of the status characters defined in the chapter Logfile Structure (see section Logfile Structure). See the chapter Fill Mode (see section Fill Mode) for a complete description of the fill mode.

--generate-logfile
-g

Generate an approximate logfile from the input and output files of the original rescue run. Note that you should keep the original offset between ‘--input-position’ and ‘--output-position’ of the original rescue run.

--input-position=pos
-i pos

Starting position in input file, in bytes. Defaults to 0. In fill mode it refers to the original input file. See the chapter Fill Mode (see section Fill Mode) for details.

--domain-logfile=file
-m file

Restrict the rescue domain to the areas marked as finished in the logfile file. This is useful if the destination drive fails during the rescue.

--no-split
-n

Do not try to split or retry error areas. Allows a fast recovery of the non-damaged part of the file. This option overrides the ‘--max-retries’ option.

--output-position=pos
-o pos

Starting position in output file, in bytes. Defaults to ‘--input-position’. The bytes below pos aren't touched if they exist and truncation is not requested. Else they are set to 0.

--quiet
-q

Quiet operation.

--max-retries=n
-r n

Exit after given number of retry passes. -1 means infinity. Defaults to 0. Every bad sector is tried only one time per pass. To retry error areas detected on a previous run, you must specify a non-zero number of retries.

--retrim
-R

Mark all error areas inside the rescue domain as non-trimmed before beginning the rescue. The effect is similar to ‘--max-retries=1’, but the bad sectors are tried in a different order, making perhaps possible to rescue some of them.

--max-size=bytes
-s bytes

Maximum size of the input data to be copied, in bytes. If ddrescue can't determine the size of the input device, you may need to specify it with this option. Note that this option specifies the size of the input data to be copied, not the size of the output file. So, for example, the following command creates an output file 300 bytes long, but only writes data on the last 200 bytes:

 
ddrescue -i 100 -s 200 infile outfile logfile
--sparse
-S

Use sparse writes for output file. May save a lot of disc space in some cases. Not all systems support this.

--truncate
-t

Truncate output file to zero size before writing to it. Only works for regular files, not for drives or partitions.

--try-again
-T

Mark all non-split and non-trimmed areas inside the rescue domain as non-tried before beginning the rescue. Try this if the drive stops responding and ddrescue immediately starts splitting error areas when restarted. If ‘--retrim’ is also specified, mark all error areas inside the rescue domain as non-tried.

--verbose
-v

Verbose mode.


Numbers given as arguments to options (positions, sizes) may be followed by a multiplier and an optional ‘B’ for "byte".

Table of SI and binary prefixes (unit multipliers):

Prefix

Value

|

Prefix

Value

|

b

hardware blocks

k

kilobyte (10^3 = 1000)

|

Ki

kibibyte (2^10 = 1024)

M

megabyte (10^6)

|

Mi

mebibyte (2^20)

G

gigabyte (10^9)

|

Gi

gibibyte (2^30)

T

terabyte (10^12)

|

Ti

tebibyte (2^40)

P

petabyte (10^15)

|

Pi

pebibyte (2^50)

E

exabyte (10^18)

|

Ei

exbibyte (2^60)

Z

zettabyte (10^21)

|

Zi

zebibyte (2^70)

Y

yottabyte (10^24)

|

Yi

yobibyte (2^80)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.