DDRESCUE(1) User Commands DDRESCUE(1)

ddrescue - data recovery tool

ddrescue [options] infile outfile [mapfile]

GNU ddrescue is a data recovery tool. It copies data from one file or block device (hard disc, cdrom, etc) to another, trying to rescue the good parts first in case of read errors.

Always use a mapfile unless you know you won't need it. Without a mapfile, ddrescue can't resume a rescue, only reinitiate it. Be careful to not specify by mistake an old mapfile from an unrelated rescue.

NOTE: In versions of ddrescue prior to 1.20 the mapfile was called 'logfile'. The format is the same; only the name has changed.

If you reboot, check the device names before restarting ddrescue. Don't use options '-F' or '-G' without reading the manual first.

display this help and exit
output version information and exit
minimum read rate of good areas in bytes/s
mark non-trimmed, non-scraped as non-tried
sector size of input device [default 512]
show binary multipliers in numbers [SI]
sectors to copy at a time [128]
don't read new data beyond mapfile limits
use direct disc access for input file
use direct disc access for output file
maximum number of [new] bad areas allowed
maximum allowed rate of read errors per second
overwrite output device or partition
fill blocks of given types with data (?*/-+l)
generate approximate mapfile from partial copy
set map of good/bad blocks from given mapfile
starting position of domain in input file [0]
compare input file size with size in mapfile
reread latest good sector after every error
initial,maximum size to skip on read error
accept unordered domain mapfile with gaps
restrict domain to finished blocks in <file>
mark all failed blocks as non-trimmed
skip the scraping phase
skip the trimming phase
starting position in output file [ipos]
reopen input file after every read error
preallocate space on disc for output file
show some lines of the latest data read [3]
suppress all messages
exit after <n> retry passes (-1=infinity) [0]
reverse the direction of all passes
maximum size of input data to be copied
use sparse writes for output file
truncate output file to zero size
maximum time since last successful read
run all passes in the same direction
be verbose (a 2nd -v gives more)
make fill mode ignore write errors
omit superfluous writes in rescue mode
extend outfile size to be at least this long
maximum number of read errors allowed
use synchronous writes for output file
maximum read rate in bytes/s
ask for confirmation before starting the copy
execute commands from standard input
select what copying pass(es) to run
initial delay before checking slow reads [30]
log significant events in <file>
log rates and error sizes in <file>
log all read operations in <file>
save/sync mapfile at given interval [auto]
maximum number of slow reads allowed
time to wait after each read error [0]
time to wait between passes [0]
reset slow reads if rate rises above min
allow infile and outfile to be the same file

Numbers may be in decimal, hexadecimal, or octal, and may be followed by a multiplier: s = sectors, k = 1000, Ki = 1024, M = 10^6, Mi = 2^20, etc... Time intervals have the format 1[.5][smhd] or 1/2[smhd].

Exit status: 0 for a normal exit, 1 for environmental problems (file not found, invalid command-line options, I/O errors, etc), 2 to indicate a corrupt or invalid input file, 3 for an internal consistency error (e.g., bug) which caused ddrescue to panic.

Report bugs to bug-ddrescue@gnu.org
Ddrescue home page: http://www.gnu.org/software/ddrescue/ddrescue.html
General help using GNU software: http://www.gnu.org/gethelp

Copyright © 2024 Antonio Diaz Diaz. License GPLv2+: GNU GPL version 2 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

The full documentation for ddrescue is maintained as a Texinfo manual. If the info and ddrescue programs are properly installed at your site, the command

info ddrescue

should give you access to the complete manual.

January 2024 GNU ddrescue 1.28