|
|
(One intermediate revision by one other user not shown) |
Line 1: |
Line 1: |
| ==Name==
| | See {{man|8|amdd}}. |
| | |
| '''amdd''' — Amanda version of dd
| |
| | |
| ==Synopsis==
| |
| | |
| '''amdd''' [-d] [-l ''length''] [if=''input''] [of=''output''] [bs=''blocksize''] [skip=''count''] [count=''count'']
| |
| | |
| ==DESCRIPTION==
| |
| | |
| Amdd provides just enough of the standard UNIX dd command for the needs of Amanda. This is handy when doing a full restore and the standard dd program has not yet been found.
| |
| | |
| Amdd also provides access to the Amanda output drivers that support various tape simulations. This may be used for debugging or to convert from one format to another.
| |
| | |
| See the [[amanda]](8) man page for more details about Amanda. See the OUTPUT DRIVERS section of [[amanda]](8) for more information on the Amanda output drivers. | |
| | |
| ==OPTIONS==
| |
| | |
| ; -d : Turn on debugging output.
| |
| ; -l''length'' : Set the output length. If the output driver limits the output size, this controls when end of tape will be simulated.
| |
| | |
| : Length may have a multiplier suffix:
| |
| : k = 1024 (Kilobytes)
| |
| : b = 512 (Blocks)
| |
| : M = 1024*1024 (Megabytes)
| |
| : The default is no multiplier (bytes).
| |
| | |
| ;if=''input'' : Input to dd. Default is stdin.
| |
| ;of=''output'' : Where to send the output of dd. Default is stdout.
| |
| ;bs=''blocksize'' : Size of each record. Input records smaller than this will not be padded. Output records will be the same size as the corresponding input record. Default is 512 bytes.
| |
| | |
| : Blocksize may have a multiplier suffix:
| |
| : k = 1024 (Kilobytes)
| |
| : b = 512 (Blocks)
| |
| : M = 1024*1024 (Megabytes)
| |
| : The default is no multiplier (bytes).
| |
| | |
| ; count=''count'' : Number of records to copy. Default is all records until end of file.
| |
| ; skip=''count'' : Number of records to skip before copying input to output. Default is zero.
| |
| | |
| ==EXAMPLES==
| |
| | |
| The first block (size 32k) of each image on a tape written by amanda contains
| |
| the info about that image.
| |
| A table of contents of an amanda backup tape:
| |
| | |
| TAPEDEV=/dev/nst0
| |
| ammt -t $TAPEDEV rewind
| |
| while ammt -t $TAPEDEV fsf 1
| |
| do
| |
| amdd if=$TAPEDEV bs=32k count=1 | head -1
| |
| done
| |
| | |
| The same block contains also the command line you need to restore:
| |
| | |
| ammt -t $TAPEDEV rewind; ammt -t $TAPEDEV fsf 12
| |
| amdd if=$TAPEDEV bs=32k count=1 | tr -d '\0\f'
| |
| | |
| The dumpimage is after that 32k header. Extract it and pipe it to e.g. gnutar:
| |
| | |
| ammt -t $TAPEDEV rewind; ammt -t $TAPEDEV fsf 12
| |
| amdd if=$TAPEDEV bs=32k skip=1 | gtar -ztvf -
| |
| | |
| Using a diskfile (vtape) instead:
| |
| | |
| TAPEDEV=file:/amanda-vtapes/daily/slots
| |
| amdd if=$TAPEDEV bs=32k count=1
| |
| | |
| Hitting EOT of a virtual tape:
| |
| | |
| $ mkdir -p /space/vtapetst/data # a "virtual" tape is a directory containing a subdir "data"
| |
| $ amdd -l 100k bs=32k if=/boot/vmlinuz of=file:/space/vtapetst
| |
| amdd: write error: No space left on device
| |
| 5+0 in
| |
| 3+1 out
| |
| | |
| ==AUTHOR==
| |
| | |
| | |
| | |
| Stefan G. Weichinger, <[email protected]>, maintainer of the AMANDA-documentation: XML-conversion | |
| | |
| ==SEE ALSO==
| |
| | |
| [[amanda]](8)
| |