Hardcore Linux

Anything about Ubuntu, Centos, openSuSe and Fedora

Backup Whole System via Network.

You could easily perform a full backup or even store a system into a raw image which can be used in as guest machine in KVM. This takes couples of hours (depends on the size of the source linux system).

Here’s how:

  1. From the target machine, you can either boot via a LiveCD or a rescue linux distro such as SystemRescueCD and via the console, check if it can detect your currently attached storage device.
    #> fdisk -l
  2. If it sees your hard drive  you can now perform the  arbitrary TCP/UDP connections and listens to port 12345.
    #> nc -l 12345 | dd of=/dev/sda
  3. In the source machine, you can know execute the command:
    #> dd if=/dev/sda | nc 12345
  4. Take note of the <port> 12345  and the <target IP> I used in the example.
  5. You can also store the dump in a raw image using this command:
    #> nc -l 12345 | dd of=myimage.img
  6. Done.

One response to “Backup Whole System via Network.

  1. Roy July 30, 2010 at 12:49 pm

    I love this blog… this trick is so immense powerfull yet loudicrolus easy!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: