Linux – Best way to clone a live linux system

clonedisk-imagelinuxmigrationphysical-to-virtual

Does anybody know of a way to clone a live linux system? I have a live installation running a production site. Problem is, I'm needing to clone it (without bring it down), and then move it over (restore) to a virtual machine. I'm basically migrating from physical hardware to virtual hardware.

Best Answer

On the source machine:

dump -0 -f - / | ssh -c blowfish root@target_machine "cd /; restore -rf -"

This will dump the fs on your source machine, copy it over ssh and on the target machine it will restore it.

Of course you need to repeat this for every fs.

'blowfish' is there just to make it for faster compression and decompression.