Backup Whole System via Network.
July 13, 2010
Posted by on
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).
- 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
- 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
- In the source machine, you can know execute the command:
#> dd if=/dev/sda | nc 192.168.1.20 12345
- Take note of the <port> 12345 and the <target IP> 192.168.1.20 I used in the example.
- You can also store the dump in a raw image using this command:
#> nc -l 12345 | dd of=myimage.img