DDRESCUE(1)
๐ DDRESCUE(1) โ the group chat guide to ddrescue ๐
okay bestie, sit down, hydrate, because this is the Unix User Commands page for ddrescue, and it is literally the rescue-romance of your hard drive's life. ๐ฆ
โจ NAME โจ
ddrescue โ data recovery tool. yes. THE data recovery tool. it saves your data when everything else has given up. main character energy, no cap. ๐
๐ธ SYNOPSIS ๐ธ
ddrescue [options] infile outfile [mapfile]
๐ DESCRIPTION ๐
GNU ddrescue is a data recovery tool. it copies data from one file or block device (hard disc, cdrom, etc) to another, and the whole vibe is that it tries to rescue the good parts first in case of read errors. it's giving triage nurse but for bytes. ๐ฉบ
Always use a mapfile unless you know you won't need it. Without a mapfile, ddrescue can't resume a rescue, only reinitiate it. and be careful to not specify by mistake an old mapfile from an unrelated rescue. that's the equivalent of grabbing a random stranger's diary and being like "continue". ๐
NOTE: In versions of ddrescue prior to 1.20 the mapfile was called 'logfile'. The format is the same; only the name has changed. glow-up, honestly. โจ
If you reboot, check the device names before restarting ddrescue. and don't use options -F or -G without reading the manual first. fr fr, those two are the "trust me bro" of flags. ๐ฅ
๐ OPTIONS ๐
-h,--helpโ display this help and exit. the "just tell me what's happening" button. ๐ซถ-V,--versionโ output version information and exit. identity reveal. ๐-a,--min-read-rate=<bytes>โ minimum read rate of good areas in bytes/s. the "you're being too slow bestie" threshold.-A,--try-againโ mark non-trimmed, non-scraped as non-tried. giving blocks a second chance, iconic. ๐-b,--sector-size=<bytes>โ sector size of input device [default512].-B,--binary-prefixesโ show binary multipliers in numbers [SI]. (SI is the default, this switches to binary. yes, theKivskdiscourse. ๐)-c,--cluster-size=<sectors>โ sectors to copy at a time [128].-C,--complete-onlyโ don't read new data beyond mapfile limits. stay in your lane, respectfully. ๐ง-d,--idirectโ use direct disc access for input file. no caching, just raw vibes.-D,--odirectโ use direct disc access for output file.-e,--max-bad-areas=[+]<n>โ maximum number of [new] bad areas allowed.-E,--max-error-rate=<bytes>โ maximum allowed rate of read errors per second. the "we're cooked" alarm. ๐ญ-f,--forceโ overwrite output device or partition. dangerous. dramatic. do NOT just send it. โ ๏ธ-F,--fill-mode=<types>โ fill blocks of given types with data (?*/-+l).-G,--generate-modeโ generate approximate mapfile from partial copy.-H,--test-mode=<file>โ set map of good/bad blocks from given mapfile.-i,--input-position=<bytes>โ starting position of domain in input file [0].-I,--check-input-sizeโ compare input file size with size in mapfile.-J,--check-on-errorโ reread latest good sector after every error. double-checking the receipt. ๐งพ-K,--skip-size=[<i>][,<max>]โ initial,maximum size to skip on read error.-L,--loose-domainโ accept unordered domain mapfile with gaps. chaotic but valid. โจ-m,--domain-mapfile=<file>โ restrict domain to finished blocks in<file>.-M,--retrimโ mark some failed blocks as non-trimmed.-n,--no-scrapeโ skip the scraping phase. speedrun strats. ๐โโ๏ธ-N,--no-sweepโ skip the sweeping phase.--no-trimโ skip the trimming phase.-o,--output-position=<bytes>โ starting position in output file [ipos].-O,--reopen-on-errorโ reopen input file after every read error.-p,--preallocateโ preallocate space on disc for output file. manifesting the space. ๐-P,--data-preview[=<lines>]โ show some lines of the latest data read [3].-q,--quietโ suppress all messages. silent mode, mysterious, gorgeous. ๐คซ-r,--retry-passes=<n>โ exit after<n>retry passes (-1=infinity) [0].-R,--reverseโ reverse the direction of all passes. going backwards like a lil crab. ๐ฆ-s,--size=<bytes>โ maximum size of input data to be copied.-S,--sparseโ use sparse writes for output file.-t,--truncateโ truncate output file to zero size.-T,--timeout=<interval>โ maximum time since last successful read.-u,--unidirectionalโ run all passes in the same direction.-v,--verboseโ be verbose (a 2nd-vgives more). spill the tea, twice. โ-w,--ignore-write-errorsโ make fill mode ignore write errors.-W,--compare-before-writeโ omit superfluous writes in rescue mode.-x,--extend-outfile=<bytes>โ extend outfile size to be at least this long.-X,--max-read-errors=<n>โ maximum number of read errors allowed.-y,--synchronousโ use synchronous writes for output file.-Z,--max-read-rate=<bytes>โ maximum read rate in bytes/s. chill, we have time. ๐ง--askโ ask for confirmation before starting the copy.--bad-sector-data=<file>โ treat sectors with<file>data as read errors.--command-modeโ execute commands from standard input.--continue-on-errno=<n>[,<n>]โ treat errno code<n>as non-fatal.--cpass=<range>โ select what copying pass(es) to run.--delay-slow=<interval>โ initial delay before checking slow reads [30].--log-events=<file>โ log significant events in<file>.--log-rates=<file>โ log rates and error sizes in<file>.--log-reads=<file>โ log all read operations in<file>.--mapfile-interval=[i][,i]โ save/sync mapfile at given interval [auto].--max-slow-reads=<n>โ maximum number of slow reads allowed.--pause-on-error=<interval>โ time to wait after each read error [0].--pause-on-pass=<interval>โ time to wait between passes [0].--reset-slowโ reset slow reads if rate rises above min.--same-fileโ allow infile and outfile to be the same file. risky little move, be careful bestie. ๐
๐ NUMBER FORMAT (the rules, bestie) ๐
Numbers may be in decimal, hexadecimal, or octal, may contain underscore separators between groups of digits, and may be followed by a SI or binary multiplier and s for 'sectors': 1_234_567kB, 4Kis, 0x1234_5678, 07_777.
In rescue mode, --size=output uses the size of the output file or device.
Time intervals have the format 1[.5][smhd] or 1/2[smhd].
โญ EXIT STATUS โญ
0for a normal exit ๐1for environmental problems (file not found, invalid command-line options, I/O errors, etc)2to indicate a corrupt or invalid input file3for an internal consistency error (e.g., bug) which causedddrescueto panic. ๐
๐ REPORTING BUGS ๐
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 ๐
Copyright ยฉ 2026 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.
๐ง SEE ALSO ๐ง
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.
and that's the whole page, babe. this was GNU ddrescue 1.30, brought to you in January 2026 โ go save some data, you've got this. ๐โจ๐๐ฆ๐ธ
๐ฆ where this page comes from
- alpine 3.24: ddrescue-doc 1.30-r0 ยท GPL-3.0-or-later
- arch rolling: ddrescue 1.30-2 ยท GPL-2.0-or-later
- epel 10: ddrescue 1.30-1.el10_2 ยท GPL-3.0-or-later
- epel 9: ddrescue 1.30-1.el9 ยท GPL-3.0-or-later
- fedora 43: ddrescue 1.30-1.fc43 ยท GPL-3.0-or-later
- fedora 44: ddrescue 1.30-3.fc44 ยท GPL-3.0-or-later
- nixpkgs unstable: ddrescue 1.30
- ubuntu resolute: gddrescue 1.30-1 ยท GPL-2.0-or-later
- ubuntu stonking: gddrescue 1.30-1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms