manpagez: man pages & more
info ddrescue
Home | html | info | man

File: ddrescue.info,  Node: Invoking ddrescuelog,  Next: Problems,  Prev: Ddrescuelog,  Up: Top

16 Invoking ddrescuelog
***********************

The format for running ddrescuelog is:

     ddrescuelog [OPTIONS] MAPFILE

   Use a hyphen '-' as MAPFILE to read the mapfile from standard input
(also in the options taking a mapfile argument) or to write the mapfile
created by '--create-mapfile' to standard output.

   Ddrescuelog supports the following options:

'-h'
'--help'
     Print an informative help message describing the options and exit.

'-V'
'--version'
     Print the version number of ddrescuelog on the standard output and
     exit. This version number should be included in all bug reports.

'-a OLD_TYPES,NEW_TYPES'
'--change-types=OLD_TYPES,NEW_TYPES'
     Change the status of every block in the rescue domain from one type in
     OLD_TYPES to the corresponding type in NEW_TYPES, much like the
     command 'tr' does, and write the resulting mapfile to standard output.
     OLD_TYPES and NEW_TYPES are strings of block status characters as
     defined in the chapter Mapfile structure (*note Mapfile structure::).
     Blocks whose status is not in OLD_TYPES are left unchanged. If
     NEW_TYPES is shorter than OLD_TYPES the last type of NEW_TYPES is
     repeated as many times as necessary.

'-A'
'--annotate-mapfile'
     Add comments containing the human-readable positions and sizes of the
     blocks in MAPFILE which are included in the rescue domain, and write
     the resulting mapfile to standard output.

'-b BYTES'
'--block-size=BYTES'
'--sector-size=BYTES'
     Block size used by ddrescuelog. Depending on the requested operation
     it may be the sector size of the input device, the block size of the
     rescued file system, etc. Defaults to 512.

'-B'
'--binary-prefixes'
     Show units with binary prefixes (powers of 1024).
     SI prefixes (powers of 1000) are used by default. (See table above,
     *note Invoking ddrescue::).

'-c[TYPE1TYPE2]'
'--create-mapfile[=TYPE1TYPE2]'
     Create a MAPFILE from a list of sectors read from standard input. The
     option '--format' determines the format of the input: either a list of
     sector numbers, or a bitmap. The sector numbers may be unordered. Only
     sectors included in the rescue domain are added to MAPFILE. If the
     mapfile is being created displaced from the input domain, the offset
     between '-i' and '-o' must be a multiple of the sector size. In this
     case, remember to specify '-o' because it defaults to the same value
     given to '-i', producing a default offset of 0.

     TYPE1 and TYPE2 are block status characters as defined in the chapter
     Mapfile structure (*note Mapfile structure::). TYPE1 sets the type for
     blocks included in the list, while TYPE2 sets the type for the rest of
     MAPFILE. If not specified, TYPE1 defaults to '+' and TYPE2 defaults to
     '-'.

'-C[TYPE]'
'--complete-mapfile[=TYPE]'
     Complete a synthetic (user fabricated) MAPFILE by filling the gaps
     with blocks of type TYPE, and write the completed mapfile to standard
     output. TYPE is one of the block status characters defined in the
     chapter Mapfile structure (*note Mapfile structure::). If TYPE is not
     specified, the gaps are filled with non-tried blocks. All gaps in
     MAPFILE are filled. Domain options are ignored.

'-d'
'--delete-if-done'
     Delete the given MAPFILE if all the blocks in the rescue domain have
     been successfully recovered. The exit status is 0 if MAPFILE could be
     deleted, 1 otherwise. If the mapfile is read from standard input,
     behave like '--done-status'. (There is nothing to delete).

'-D'
'--done-status'
     Test if all the blocks in the rescue domain have been successfully
     recovered. The exit status is 0 if all tested blocks are finished, 1
     otherwise.

'-f'
'--force'
     Force overwrite of MAPFILE.

'-F NAME'
'--format=NAME'
     Select the input format for '--create-mapfile', or the output format
     for '--list-blocks'. The valid names are 'list', 'bitmap', 'bitmap-be'
     (big endian), and 'bitmap-le' (little endian). Plain 'bitmap' is
     equivalent to 'bitmap-le'. The default format is 'list' (a list of
     block numbers). In a big endian bitmap the first block is represented
     by the most significant bit of the first byte. In a little endian
     bitmap the first block is represented by the least significant bit of
     the first byte.

'-i BYTES'
'--input-position=BYTES'
     Starting position of the rescue domain, in bytes. Defaults to 0. It
     refers to a position in the original INFILE.

'-l TYPES'
'--list-blocks=TYPES'
     By default print on standard output the sector numbers of the blocks
     specified as any of TYPES in MAPFILE and included in the rescue
     domain. The list format is one sector number per line in decimal, like
     the output of the program 'badblocks', so that it can be used as input
     for e2fsck or other similar filesystem repairing tool.

     If a bitmap '--format' is specified, write to standard output a bitmap
     of the endianness chosen, with ones for the sectors specified and
     zeros for sectors from other block types. The bits set to 1 in the
     bitmap should be equivalent to the list of blocks.

     TYPES contains one or more of the block status characters defined in
     the chapter Mapfile structure (*note Mapfile structure::). If the
     output numbers or bits are being created displaced from their position
     in the input domain, the offset between '-i' and '-o' must be a
     multiple of the block size. In this case, remember to specify '-o'
     because it defaults to the same value given to '-i', producing a
     default offset of 0.

     A sector is listed (or set to 1 in bitmap output) if selected, even
     partially. (The positions and sizes of the mapfile blocks are not
     required to be multiples of the sector size).

'-L'
'--loose-domain'
     Accept an incomplete synthetic (user fabricated) domain mapfile or
     compare-as-domain mapfile, and fill the gaps in the list of data
     blocks with non-tried blocks. The blocks in the mapfile may be
     unordered, may overlap other blocks of the same status, and don't need
     to be contiguous. This option allows making quick edits to a mapfile
     without all the size calculations involved in making all data blocks
     contiguous again.

'-m FILE'
'--domain-mapfile=FILE'
     Restrict the rescue domain to the blocks marked as finished in the
     mapfile FILE.

'-n'
'--invert-mapfile'
     Invert the types of the blocks in MAPFILE which are included in the
     rescue domain, and write the resulting mapfile to standard output.
     Finished blocks ('+') are changed to bad-sector ('-'), all other types
     are changed to finished. '--invert-mapfile' is equivalent to
     '--change-types=?*/-+,++++-'

'-o BYTES'
'--output-position=BYTES'
     Starting position of the image of the rescue domain in the original
     OUTFILE, in bytes. It is used by the options '--create-mapfile',
     '--list-blocks', and '--shift'. Defaults to '--input-position'.

'-p FILE'
'--compare-mapfile=FILE'
     Compare the types of the blocks included in the rescue domain. The exit
     status is 0 if all the blocks tested are the same in both FILE and
     MAPFILE, 1 otherwise.

'-P FILE'
'--compare-as-domain=FILE'
     Compare only the blocks marked as finished in the rescue domain. The
     exit status is 0 if all the blocks tested are the same in both FILE and
     MAPFILE, 1 otherwise. Two files comparing equal with this option are
     equivalent when used as domain mapfiles.

'-q'
'--quiet'
     Quiet operation. Suppress all messages.

'-s BYTES'
'--size=BYTES'
     Maximum size of the rescue domain in bytes. It refers to a size in the
     original INFILE. -1 removes any previous size limit.

'-t'
'--show-status'
     Print a summary of the contents of each MAPFILE to the standard
     output. This option allows more than one MAPFILE. If the domain
     setting options are used, the summary can be restricted to one or
     several parts of MAPFILE.

'-v'
'--verbose'
     Verbose mode. Further -v's (up to 4) increase the verbosity level.

'-x FILE'
'--xor-mapfile=FILE'
     Perform a logical XOR (exclusive OR) operation between the finished
     blocks in FILE and those in MAPFILE, and write the resulting mapfile to
     standard output. In other words, in the resulting mapfile a block is
     only shown as finished if it was finished in either of the two input
     mapfiles but not in both.

'-y FILE'
'--and-mapfile=FILE'
     Perform a logical AND operation between the finished blocks in FILE
     and those in MAPFILE, and write the resulting mapfile to standard
     output. In other words, in the resulting mapfile a block is only shown
     as finished if it was finished in both input mapfiles.

'-z FILE'
'--or-mapfile=FILE'
     Perform a logical OR operation between the finished blocks in FILE and
     those in MAPFILE, and write the resulting mapfile to standard output.
     In other words, in the resulting mapfile a block is shown as finished
     if it was finished in either of the two input mapfiles.

'--shift'
     Shift the positions of all the blocks in MAPFILE by the offset
     ('--output-position' - '--input-position'), and write the resulting
     mapfile to standard output. Either '--input-position' or
     '--output-position' must be 0. Any blocks beyond the end of the rescue
     domain are removed before performing the shift. The remaining blocks
     are shifted even if they are outside the rescue domain. If the offset
     is positive, a non-tried block is inserted before the first block to
     fill the gap.


   Exit status: 0 for a normal exit, 1 for environmental problems (file not
found, invalid command-line options, I/O errors, etc), 2 to indicate a
corrupt or invalid input file, 3 for an internal consistency error (e.g.,
bug) which caused ddrescuelog to panic.

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.