1DDRESCUE(1) User Commands DDRESCUE(1)
2
3
4
6 ddrescue - data recovery tool
7
9 ddrescue [options] infile outfile [mapfile]
10
12 GNU ddrescue is a data recovery tool. It copies data from one file or
13 block device (hard disc, cdrom, etc) to another, trying to rescue the
14 good parts first in case of read errors.
15
16 Always use a mapfile unless you know you won't need it. Without a map‐
17 file, ddrescue can't resume a rescue, only reinitiate it. Be careful to
18 not specify by mistake an old mapfile from an unrelated rescue.
19
20 NOTE: In versions of ddrescue prior to 1.20 the mapfile was called
21 'logfile'. The format is the same; only the name has changed.
22
23 If you reboot, check the device names before restarting ddrescue.
24 Don't use options '-F' or '-G' without reading the manual first.
25
27 -h, --help
28 display this help and exit
29
30 -V, --version
31 output version information and exit
32
33 -a, --min-read-rate=<bytes>
34 minimum read rate of good areas in bytes/s
35
36 -A, --try-again
37 mark non-trimmed, non-scraped as non-tried
38
39 -b, --sector-size=<bytes>
40 sector size of input device [default 512]
41
42 -B, --binary-prefixes
43 show binary multipliers in numbers [SI]
44
45 -c, --cluster-size=<sectors>
46 sectors to copy at a time [128]
47
48 -C, --complete-only
49 don't read new data beyond mapfile limits
50
51 -d, --idirect
52 use direct disc access for input file
53
54 -D, --odirect
55 use direct disc access for output file
56
57 -e, --max-bad-areas=[+]<n>
58 maximum number of [new] bad areas allowed
59
60 -E, --max-error-rate=<bytes>
61 maximum allowed rate of read errors per second
62
63 -f, --force
64 overwrite output device or partition
65
66 -F, --fill-mode=<types>
67 fill blocks of given types with data (?*/-+l)
68
69 -G, --generate-mode
70 generate approximate mapfile from partial copy
71
72 -H, --test-mode=<file>
73 set map of good/bad blocks from given mapfile
74
75 -i, --input-position=<bytes>
76 starting position of domain in input file [0]
77
78 -I, --verify-input-size
79 verify input file size with size in mapfile
80
81 -J, --verify-on-error
82 reread latest good sector after every error
83
84 -K, --skip-size=[<i>][,<max>]
85 initial,maximum size to skip on read error
86
87 -L, --loose-domain
88 accept unordered domain mapfile with gaps
89
90 -m, --domain-mapfile=<file>
91 restrict domain to finished blocks in <file>
92
93 -M, --retrim
94 mark all failed blocks as non-trimmed
95
96 -n, --no-scrape
97 skip the scraping phase
98
99 -N, --no-trim
100 skip the trimming phase
101
102 -o, --output-position=<bytes>
103 starting position in output file [ipos]
104
105 -O, --reopen-on-error
106 reopen input file after every read error
107
108 -p, --preallocate
109 preallocate space on disc for output file
110
111 -P, --data-preview[=<lines>]
112 show some lines of the latest data read [3]
113
114 -q, --quiet
115 suppress all messages
116
117 -r, --retry-passes=<n>
118 exit after <n> retry passes (-1=infinity) [0]
119
120 -R, --reverse
121 reverse the direction of all passes
122
123 -s, --size=<bytes>
124 maximum size of input data to be copied
125
126 -S, --sparse
127 use sparse writes for output file
128
129 -t, --truncate
130 truncate output file to zero size
131
132 -T, --timeout=<interval>
133 maximum time since last successful read
134
135 -u, --unidirectional
136 run all passes in the same direction
137
138 -v, --verbose
139 be verbose (a 2nd -v gives more)
140
141 -w, --ignore-write-errors
142 make fill mode ignore write errors
143
144 -x, --extend-outfile=<bytes>
145 extend outfile size to be at least this long
146
147 -X, --max-read-errors=<n>
148 maximum number of read errors allowed
149
150 -y, --synchronous
151 use synchronous writes for output file
152
153 -Z, --max-read-rate=<bytes>
154 maximum read rate in bytes/s
155
156 --ask ask for confirmation before starting the copy
157
158 --command-mode
159 execute commands from standard input
160
161 --cpass=<range>
162 select what copying pass(es) to run
163
164 --delay-slow=<interval>
165 initial delay before checking slow reads [30]
166
167 --log-events=<file>
168 log significant events in <file>
169
170 --log-rates=<file>
171 log rates and error sizes in <file>
172
173 --log-reads=<file>
174 log all read operations in <file>
175
176 --mapfile-interval=[i][,i]
177 save/sync mapfile at given interval [auto]
178
179 --max-slow-reads=<n>
180 maximum number of slow reads allowed
181
182 --pause-on-error=<interval>
183 time to wait after each read error [0]
184
185 --pause-on-pass=<interval>
186 time to wait between passes [0]
187
188 --reset-slow
189 reset slow reads if rate rises above min
190
191 --same-file
192 allow infile and outfile to be the same file
193
194 Numbers may be in decimal, hexadecimal, or octal, and may be followed
195 by a multiplier: s = sectors, k = 1000, Ki = 1024, M = 10^6, Mi = 2^20,
196 etc... Time intervals have the format 1[.5][smhd] or 1/2[smhd].
197
198 Exit status: 0 for a normal exit, 1 for environmental problems (file
199 not found, invalid flags, I/O errors, etc), 2 to indicate a corrupt or
200 invalid input file, 3 for an internal consistency error (e.g., bug)
201 which caused ddrescue to panic.
202
204 Report bugs to bug-ddrescue@gnu.org
205 Ddrescue home page: http://www.gnu.org/software/ddrescue/ddrescue.html
206 General help using GNU software: http://www.gnu.org/gethelp
207
209 Copyright © 2022 Antonio Diaz Diaz. License GPLv2+: GNU GPL version 2
210 or later <http://gnu.org/licenses/gpl.html>
211 This is free software: you are free to change and redistribute it.
212 There is NO WARRANTY, to the extent permitted by law.
213
215 The full documentation for ddrescue is maintained as a Texinfo manual.
216 If the info and ddrescue programs are properly installed at your site,
217 the command
218
219 info ddrescue
220
221 should give you access to the complete manual.
222
223
224
225GNU ddrescue 1.26 January 2022 DDRESCUE(1)