Archive for the tag 'dd'

SBDavid

Backup using the dd command

`dd’: Convert and copy a file

`dd’ copies a file (from standard input to standard output, by default)with a changeable I/O block size, while optionally performing conversions on it. Synopses:

dd [OPERAND]…
dd OPTION

The only options are `–help’ and `–version’.

For instance, to make an exact clone of the /boot partition to a backup file, you could use:

# dd if=/dev/sda1 of=/srv/boot-linux.img

We can also use bzip2 to compresses files and then bunzip2 (or bzip2 -d) decompresses all specified files.

To clone one hard disk to another first use fdisk to recreate the appropriately-sized partitions, on the new disk and then use dd to do the actual cloning.

dd –help
Usage: dd [OPERAND]…
or: dd OPTION

Copy a file, converting and formatting according to the operands.

bs=BYTES force ibs=BYTES and obs=BYTES
cbs=BYTES convert BYTES bytes at a time
conv=CONVS convert the file as per the comma separated symbol list
count=BLOCKS copy only BLOCKS input blocks
ibs=BYTES read BYTES bytes at a time
if=FILE read from FILE instead of stdin
iflag=FLAGS read as per the comma separated symbol list
obs=BYTES write BYTES bytes at a time
of=FILE write to FILE instead of stdout
oflag=FLAGS write as per the comma separated symbol list
seek=BLOCKS skip BLOCKS obs-sized blocks at start of output
skip=BLOCKS skip BLOCKS ibs-sized blocks at start of input
status=noxfer suppress transfer statistics