dd_rescue(1) Data recovery and protection tool dd_rescue(1) NAME () dd_rescue - SYNOPSIS ( ) dd_rescue [options] infile outfile dd_rescue [options] [-2/-3/-4/-z/-Z seed/seedfile] outfile dd_rescue [options] [--shred2/--shred3/--shred4/--random/--frandom seed/seedfile] outfile DESCRIPTION () dd_rescue ( ...) ( ) . (seekable) ( ) dd_rescue (softbs) . dd_rescue (hardbs) . dd_rescue . ( -A / --alwayswrite .). dd_rescue (bad spot) . ( ) . dd_rhelp . dd_rescue ( ) (truncate) . dd_rescue (logfile) . . dd_rescue direct IO / fallocate() splice ( zerocopy ) (sparse files) (PRNG) . dd_rescue . "-" infile outfile stdin stdout . (seekable) dd_rescue . OPTIONS () dd_rescue . : b -- () k -- ( kiB) M -- 1024^2 ( MiB) G -- 1024^3 ( GiB) dd_rescue . General options ( ) -h, --help dd_rescue . -V, --version . -q, --quiet dd_rescue . -v, --verbose dd_rescue () . -c 0/1, --color=0/1 dd_rescue . TERM dumb -m -mono . -f, --force dd_rescue (sanity checks) ( ipos < opos). -i, --interactive dd_rescue . Block sizes ( ) -b softbs, --softbs=softbs, --bs=softbs () softbs . dd_rescue ( ). 64k buffered I/O 1M direct I/O . -B hardbs, --hardbs=hardbs, --block-size=hardbs () hardbs . dd_rescue . 4k buffered I/O direct I/O . hardbs softbs . ( ) . -y syncsize, --syncfreq=syncsize dd_rescue syncsize fsync() ( softbs ). . syncsize fsync() . (Positions and length) -s ipos, --ipos=ipos, --input-position=ipos infile ipos . ipos ( ) softbs hardbs. 0 . ipos 0 . . -S opos, --opos=opos, --output-position=opos outfile opos . opos ipos . opos 0 . -x, --extend, --append . dd_rescue . -m maxxfer, --maxxfer=maxxfer, --max-size=maxxfer ( ) dd_rescue . maxxfer (EOF) . -M, --noextend dd_rescue . . . (Error handling) -e maxerr, --maxerr=maxerr dd_rescue maxerr . 0 dd_rescue EOF ( maxxfer ) . -w, --abort_we dd_rescue . dd_rescue . dd_rescue dd_rescue / (direct I/O) . writeback syslog . dd_rescue fsync() fsync() close() . dd_rescue . (Sparse files and write avoidance) -A, --alwayswrite dd_rescue . . ( ) . -a, --sparse dd_rescue ( softbs) . (sparse file) ( ) . . dd_rescue . succxfer . -W, --avoidwrite dd_rescue ( softbs) . . ( ). -@ readtime, --sparse_nonslow=readtime . ( ) -a (--sparse) ( SSD) . . . ( ) sparse . SSD . (Other optimization) -R, --repeat dd_rescue ( softbs) . EOF ( -m -M) . "/dev/zero" . -u, --rmvtrim dd_rescue FITRIM . ( ) . ( -f (--force) dd_rescue .) ( ) . ioctl FITRIM ( ) ( fstrim discard) ATA TRIM SCSI DISCARD/WRITE_SAME. (superuser) ( ). / SSD thinly provisioned . FITRIM discard ( fstrim) . . -k, --splice dd_rescue zerocopy splice() . dd_rescue . . -P, --fallocate dd_rescue fallocate() . ( maxxfer ). (fragmentation) . ( sparse fallocate() .) dd_rescue fallocate() . libfallocate . -C rate, --ratecontrol=rate dd_rescue rate ( ) . . . . 32k (kB/s) softblocksize . Misc options ( ) -r, --reverse dd_rescue ipos ( 0 EOF ) . (bad spot) ( ). dd_rescue memmove() . -f / --force . -p, --preserve ( xattr) cp. ACL xattr dd_rescue libxattr . -p dd_rescue . -p ( ) xattr . -t, --truncate dd_rescue O_TRUNC ( ) 0 (truncate) . dd_rescue . -T, --trunclast dd_rescue . -d, --odir_in dd_rescue infile O_DIRECT . ( / ) ( ) / ( ) . O_DIRECT . -D, --odir_out dd_rescue outfile O_DIRECT . . / ( ) . Logging ( ) -l logfile, --logfile=logfile dd_rescue stderr . logfile . ( ) . -o bbfile, --bbfile=bbfile dd_rescue bbfile . (ASCII) hardbs . badblocks . dd_rescue () hardbs bbfile -l mke2fs . Multiple output files ( ) -Y ofileX, --outfile=ofileX, --of=ofileX . . outfile . . Data protection by overwriting with random numbers ( ) -z RANDSEED, --random=RANDSEED -Z RANDSEED, --frandom=RANDSEED -2 RANDSEED, --shred2=RANDSEED -3 RANDSEED, --shred3=RANDSEED -4 RANDSEED, --shred4=RANDSEED /dev/urandom ( ) . (PRNG) . -z / --random PRNG C . -Z / --frandom -2/-3/-4 / --shred2/3/4 PRNG RC4 . infile . PRNG (seed) PRNG C ( ) PRNG RC4 . RANDSEED PRNG C . RC4 PRNG C . PRNG . RANDSEED 0 PID ( ) dd_rescue . RANDSEED . dd_rescue PRNG C RC4 . /dev/urandom . -2/-3/-4 --shred2/--shred3/--shred4 fsync() . . ( SSD) . -2 / --shred2 PRNG RC4 . -3 / --shred3 RC4 PRNG PRNG ( ) . -4 / --shred4 -3 / --shred3 . Plugins () 1.42 dd_rescue . . -L plugin1[=param1[:param2[:..]]][,plugin2[=..][,..]] --plugins=plugin1[=param1[:param2[:..]]][,plugin2[=..][,..]] plugin1 ... . help . dd_rescue . splice splice . . (sparse detection) . PLUGINS . PLUGINS () null null ( ddr_null) [no]lnchange [no]change . ( no .) hash / (extended attributes) (hole detection) . ddr_null_ddr debug . hash hash ( ddr_hash ) HMAC . alg[o[rithm]]=ALG ALG md5 sha1 sha256 sha224 sha512 sha384 . ( alg=help .) =alg . hash MD5 md5 . md5sum/sha256sum/... ( ) ( ) . hash (sparse) . multipart=CHUNKSIZE ddr_hash CHUNKSIZE . S3 ( md5) . 1.99.6 CHUNKSIZE . . append/prepend/hmac . ddr_hash append=STRING STRING . STRING (shared secret) ( ) . ( ). HMAC . ddr_hash prepend=STRING (brute force) . ddr_hash STRING 0 (pad) . ddr_hash HMAC ( ) . HMAC . HMAC ( ) (extension) (collision) . ( HMAC append/prepend .) HMAC HMAC ddr_hash . / HMAC CHECKSUMS (extended attribute) ( ). hmacpwd=STRING () HMAC . . hmacpwdfd=INT () HMAC . 0 (stdin) ddr_hash (prompt) ... dd_rescue . hmacpwdnm=INNAME () . ( 2048 ) 0 . ddr_hash / / swap/page . ( .) ddr_hash output ddr_hash md5sum/sha256sum/... stdout . outfd=INT INT . ddr_hash (*) output/outfd= . outnm=OUTNAME . OUTNAME md5sum/sha256sum/... . . . OUTNAME CHECKSUMS.alg ( HMAC HMACS.alg) (alg ). dd_rescue . chknm=CHKNAME . . ddr_hash md5sum/sha256sum/... . NAME ( outnm=...) . check . -- . dd_rescue . ( dd_rescue 0 dev/null/ .) chknm ( chk_xattr ) chkadd ( xattr) . . set_xattr . user.checksum.ALG ( HMAC user.hmac.ALG) set_xattr=XATTR.NAME . xattr fallb[ack][=CHKNAME] . ddr_hash CHKNAME . ( CHKNAME outnm= .) chk_xattr . chk_xattr=XATTR.NAME . . ( fallback ). checknm=CHKNAME . . output outfd outnm= set_xattr ddr_hash ( xattr ) ddr_hash . ddr_hash . ddr_hash . chknm= check chk_xattr ddr_hash ( xattr ) ddr_hash . ddr_hash . (extended attributes) ( dd_rescue -p) . ( ftp http) PGP/GnuPG . md5 (hash collisions) . sha1 2017 . SHA-2 . 32 sha256 64 sha512 . x86-64 armv8/aarch64 sha256 sha512 . dd_rescue ( 1.99.16 ). ddr_hash HMAC PKCS5 PBKDF2 ( ) (salt) (key stretching) . . . . crypt crypt . AES . ddr_crypt(1) . lzo ( lzo) lzo liblzo2 . lzo . ddr_lzo(1) . ddr_lzma ( ddr_lzma) / xz liblzma. xz . lzma (CPU) . . ddr_lzma(1) . EXIT STATUS ( ) dd_rescue 0 . . EXAMPLES () dd_rescue -k -P -p -t infile outfile infile outfile (truncate) ( ) (mode) fallocate splice . dd_rescue -A -d -D -b 512 /dev/sda /dev/sda sda . (reallocate) . . dd_rescue -2 /dev/urandom -M outfile outfile . dd_rescue -t -a image1.raw image2.raw (filesystem image) (sparse) . ( . dd_rescue -u /dev/zero DUMMY ...) dd_rescue -ATL hash=md5:output,lzo=compress:bench,MD5:output in out.lzo in out.lzo lzo (lzo1x_1) md5 () . md5 md5sum stdout . compress lzo . (filter chain) . . dd_rescue -L hash=sha512:set_xattr:fallb,null=change infile /dev/null infile sha512 . user.checksum.sha512 ( xattr CHECKSUMS.sha512 ). null change hash . xattr infile CHECKSUMS.sha512 . README.dd_rescue ddr_lzo(1) . TESTING () (bug) . dd_rescue . . (fault injection) . -F 5w/1,17r/3,42r/-1,80-84r/0 ( hardblocksize) ( dd_rescue ) ( ). (80-84 ). -s . ( 1.98 .) -H percent . / . GNU libc . ( 1.99.21 .) BUGS/LIMITATIONS (/) glibc (file positioning) . . . ( xBSD M*cOS) dd_rescue ( make check ). (escape sequence) . ( vt100 linux) . dd_rescue-1.10 (non-seekable) . dd_rescue . dd_rhelp LAB Valentin . dd_rescue . GNU ddrescue dd_rhelp . dd_rescue dd_rescue dd_rhelp . dd_rescue dd_rhelp GNU ddrescue . ( ) . SMART . . Data destruction considerations ( ) . (Peter Gutmann) --shred4 . BSI GSDS M7.15 . . SSD (FTL) . SECURITY_ERASE ( hdparm) -- -- AES256 . . . dd_rescue . . (COW) btrfs . (dd_rescue -u /dev/zero /path/to/fs/DUMMYNAME) . . SEE ALSO ( ) README.dd_rescue README.dd_rhelp ddr_lzo(1) wipe(1) shred(1) ddrescue(1) dd(1) AUTHOR () Kurt Garloff CREDITS () Valentin LAB dd_rhelp . RC4 PRNG (frandom) PRNG Eli Billauer . Thomas . COPYRIGHT ( ) (GNU GPL) - - . HISTORY () 1.10 (non seekable) . (Splice copy) -k 1.15 . 1.17 . (fallocate) -P 1.19 . 1.23 -y0 . 1.29 . -W 1.30 . -Y 1.32 . (man page) 1.33 . (SSE2 armv6 armv8 AVX2) 1.35 1.43 . libxattr 1.40 . (fstrim) 1.41 . bionic ( C ) 1.41 . 1.42 MD5 1.42 lzo 1.43 . 1.44 MD5 hash SHA-2 . 1.45 SHA-1 . 1.98 (fault injection) 1.99 ARMv8 . 1.99.5 (ratecontrol) . 1.99.6 S3 . 1.99.7-12 openSSL-1.1 -3.0 . 1.99.13-16 sha256 . 1.99.17 liblzma (xz) . 1.99.18-19 (holes) . 1.99.20-21 . : http://garloff.de/kurt/linux/ddrescue/ dd_rhelp Valentin LAB : http://www.kalysto.org/utilities/dd_rhelp/index.en.html Kurt Garloff 2025-06-24 dd_rescue(1)