tags 541339 patch I wrote a patch for the man page, and I have attached it here. The man page should now display the same information as 'safecopy --help'.
-- Runa Sandvik
--- /home/runa/safecopy/safecopy/safecopy-1.3/debian/manpages/safecopy.1 2009-09-07 13:08:21.000000000 +0200 +++ /home/runa/safecopy/tmp/safecopy-1.3/debian/manpages/safecopy.1 2009-09-07 14:16:41.000000000 +0200 @@ -22,26 +22,140 @@ .SH OPTIONS Usage: safecopy [options] <source> <target> .TP -.B -b <bytes> +.B --stage1 +.br +Preset to rescue most of the data fast, using no retries and avoiding +bad areas. +Presets: -f 10% -r 10% -R 1 -Z 0 -L 2 -M BaDbLoCk -o stage1.badblocks +.TP +.B --stage2 +.br +Preset to rescue more data, using no retries but searching for exact +ends of bad areas. +Presets: -f 128* -r 1* -R 1 -Z 0 -L 2 -I stage1.badblocks -o +stage2.badblocks +.TP +.B --stage3 +.br +Preset to rescue everything that can be rescued using maximum retries, +head realignment tricks and low level access. +Presets: -f 1* -r 1* -R 4 -Z 1 -L 2 -I stage2.badblocks -o +stage3.badblocks +.br + +.br +All stage presets can be overridden by individual options. +.TP +.B -b <size> .br Blocksize in bytes, also used for skipping offset when searching for the end of a bad area. -Set this to physical sectorsize of your media. -Default: 512 +Set this to physical sectorsize of your media. +Default: 512. +.TP +.B -f <size> +.br +Blocksize when skipping over badblocks. Higher settings put less strain +on your hardware, but you might miss good areas in between two bad ones. +Default: 16*. .TP -.B -r <bytes> +.B -r <size> +.br Resolution in bytes when searching for the exact beginning or end of a bad area Bigger values increase performace at potential costof valid data -close to damaged areas. Default: 4 +close to damaged areas. Default: 4. +.TP +.B -R <number> +.br +At least that many read attempts are made on the first bad block of a +damaged area with minimum resolution. More retries can sometimes recover +a weak sector, but at the cost of additional strain. Default: 3. +.TP +.B -Z <number> +.br +On each error, force seek the read head from start to end of the source +device as often as specified. That takes time, creates additional strain +and might not be supported by all devices or drivers. Default: 1. +.TP +.B -L <mode> +.br +Use low level device calls as specified: +.br + +.br +0 Do not use low level device calls +.br +1 Attempt low level device calls for error recovery only +.br +2 Always use low level device calls if available +.TP +.B --sync +.br +Use synchronized read calls (disable driver buffering). Default: +Asynchronous read buffering by the OS is allowed. .TP .B -s <blocks> Start position where to start reading. Will correspond -to position 0 in the destination file. Default: block 0 +to position 0 in the destination file. Default: block 0. .TP .B -l <blocks> +.br Length of data to be read. Default: size of input file. .TP +.B -I <badblockfile> +.br +Incremental mode. Assume the target file already exists and has holes +specified in the badblockfile. It will be attempted to retrieve more +data from the listed blocks or from beyond the file size of the target +file only. +.B Warning: +Without this option, the destination file will be emptied prior to +writing. Use -I /dev/null if you want to continue a previous run of +safecopy without a badblock list. Default: none. +.TP +.B -i <bytes> +.br +Blocksize to interpret the badblockfile given with -I. Default: +Blocksize as specified by -b. +.TP +.B -X <badblockfile> +.br +Exclusion mode. If used together with -I, excluded blocks override +included blocks. Safecopy will not read or write any data from areas +covered by exclude blocks. Default: none. +.TP +.B -x <bytes> +.br +Blocksize to interpret the badblockfile given with -X. Default: +Blocksize as specified by -b. +.TP +.B -o <badblockfile> +.br +Write a badblocks/e2fsck compatible bad block file. Default: none. +.TP +.B -S <seekscript> +.br +Use external script for seeking in input file. (Might be useful for tape +devices and similar). Seekscript must be an executable that takes the +number of blocks to be skipped as argv1 (1-64) the blocksize in bytes as +argv2 and the current position (in bytes) as argv3. Return value needs +to be the number of blocks successfully skipped, or 0 to indicate seek +failure. The external seekscript will only be used if lseek() fails and +we need to skip over data. Default: none. +.TP +.B -M <string> +.br +Mark unrecovered data with this string instead of skipping it. This +helps in later finding corrupted files on rescued file system images. +The default is to zero unreadable data on creation of output files, and +leaving the data as it is on any later run. +.B Warning: +When used in combination with incremental mode (-I) this may overwrite +data in any block that occurs in the -I file. Blocks not in the -I file, +or covered by the file specified with -X are save from being +overwritten. Default: none. +.TP .B -h | --help Show this text. .SH DESCRIPTION OF OUTPUT