Remote Backups

For a simple but efficient way to perform remote backups, you can use the dd and netcat commands.

Netcat is available in two flavors ;-):

  emerge gnu-netcat
  

or

  emerge netcat
  

To create an image of your entire hda1 partition, start netcat in passive (listening) mode on the remote machine:

  netcat -l -p 10000 > image.gz
  

On your machine, run dd to read the partition, gzip to compress it, and netcat to transfer the image to the other machine:

  dd if=/dev/hda1 | gzip | netcat -w 5 remote_ip 10000
  

Refer to How to clone a Linux box using netcat for more information.

Resources

Last updated 02 Aug 2007, 14:34 CEST. history