September 1, 2009

Backup and Restore Disk Images Over A Network

Here is a quick and easy way to save and restore hard disk images using dd, netcat and gzip.

To Save An Image:
On the server: nc -l -p 7000 | dd of=Output.img
On the client: dd if=/dev/sdb | gzip -9 | nc 12.34.56.78 7000

To Restore:
On the client: nc -l -p 7000 | gzip -dc | dd of=/dev/sda
On the server: dd if=Output.img | nc 12.34.56.78 7000

I just boot the client using an Ubuntu live-cd, all the neccessary tools are already installed. I store my images gzipped to save space, I just copied a 40 GB disk and the image file compressed down to 4.4 GB!

Permalink • Print • Comment

Trackback uri

http://kylehall.info/index.php/2009/09/01/backup-and-restore-disk-images-over-a-network/trackback/

Leave a Comment

You must be logged in to post a comment.

Made with WordPress and an easy to customize WordPress theme • Fire Brick skin by Denis de Bernardy