1DDRESCUE(1)                      User Commands                     DDRESCUE(1)
2
3
4

NAME

6       ddrescue - data recovery tool
7

SYNOPSIS

9       ddrescue [options] infile outfile [mapfile]
10

DESCRIPTION

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

OPTIONS

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       -W, --compare-before-write
145              omit superfluous writes in rescue mode
146
147       -x, --extend-outfile=<bytes>
148              extend outfile size to be at least this long
149
150       -X, --max-read-errors=<n>
151              maximum number of read errors allowed
152
153       -y, --synchronous
154              use synchronous writes for output file
155
156       -Z, --max-read-rate=<bytes>
157              maximum read rate in bytes/s
158
159       --ask  ask for confirmation before starting the copy
160
161       --command-mode
162              execute commands from standard input
163
164       --cpass=<range>
165              select what copying pass(es) to run
166
167       --delay-slow=<interval>
168              initial delay before checking slow reads [30]
169
170       --log-events=<file>
171              log significant events in <file>
172
173       --log-rates=<file>
174              log rates and error sizes in <file>
175
176       --log-reads=<file>
177              log all read operations in <file>
178
179       --mapfile-interval=[i][,i]
180              save/sync mapfile at given interval [auto]
181
182       --max-slow-reads=<n>
183              maximum number of slow reads allowed
184
185       --pause-on-error=<interval>
186              time to wait after each read error [0]
187
188       --pause-on-pass=<interval>
189              time to wait between passes [0]
190
191       --reset-slow
192              reset slow reads if rate rises above min
193
194       --same-file
195              allow infile and outfile to be the same file
196
197       Numbers  may  be in decimal, hexadecimal, or octal, and may be followed
198       by a multiplier: s = sectors, k = 1000, Ki = 1024, M = 10^6, Mi = 2^20,
199       etc...  Time intervals have the format 1[.5][smhd] or 1/2[smhd].
200
201       Exit  status:  0  for a normal exit, 1 for environmental problems (file
202       not found, invalid command line options, I/O errors, etc), 2  to  indi‐
203       cate a corrupt or invalid input file, 3 for an internal consistency er‐
204       ror (e.g., bug) which caused ddrescue to panic.
205

REPORTING BUGS

207       Report bugs to bug-ddrescue@gnu.org
208       Ddrescue home page: http://www.gnu.org/software/ddrescue/ddrescue.html
209       General help using GNU software: http://www.gnu.org/gethelp
210
212       Copyright © 2023 Antonio Diaz Diaz.  License GPLv2+: GNU GPL version  2
213       or later <http://gnu.org/licenses/gpl.html>
214       This  is  free  software:  you  are free to change and redistribute it.
215       There is NO WARRANTY, to the extent permitted by law.
216

SEE ALSO

218       The full documentation for ddrescue is maintained as a Texinfo  manual.
219       If  the info and ddrescue programs are properly installed at your site,
220       the command
221
222              info ddrescue
223
224       should give you access to the complete manual.
225
226
227
228GNU ddrescue 1.27                January 2023                      DDRESCUE(1)
Impressum