Re: Backing up linux disk to image on external usb hard disk





On Jan 29, 12:58 pm, Maurice Batey <maur...@xxxxxxxxxxxxxxxxxxxxx>
wrote:
On Mon, 29 Jan 2007 02:33:03 -0800, mbanyon wrote:
I would like a full disk
image backup of my linux install onto my external hdd I use Knoppix (Live DVD) and the instruction 'cat' to do this, e.g.

cat /dev/hdb > /media/sda1/linux_image

In this case, cat is acceptable but inefficient. It would have been
better to use dd(1), as in
dd if-/dev/hdb of=/media/sda1/linux_image bs=4096

Or - to get compression:

cat /dev/hdb | gzip > /media/sda1/linux_image.gz

Useless use of cat

Try
gzip </dev/hdb >/media/sda1/linux_image.gz

And to be told how long it took, just prefix with 'time', i.e.

time cat /dev/hdb | gzip > /media/sda1/linux_image.gz

time gzip </dev/hdb >/media/sda1/linux_image.gz

Proof of the pudding?

Last year my Linux drive went castors up. Restored the backup onto
new drive with just one command:

time cat /media/sda1/linux_image.gz | gunzip > /dev/hdb

UUoC
time ginzip </media/sda1/linux_image.gz >/dev/hdb

It then booted up normally as if nothing had happened.

HTH
--
Lew

.



Relevant Pages