How to create a disk image remotely from a live system

written by Admin

Posted on 2012-11-19


I must clone a live server and create a disk image on a remote linux machine.
How can I transfer all data over the network using standard utils?


On the destination machine type:
# netcat -l 23456 | gzip -dc | dd of=/disk.img

...then on the source machine type:
# dd if=/dev/sda1 | gzip -c | nc <ip> 23456

Some old netcat versions need nc -l -p 23456 (no more -p on modern versions).
Setup iptables properly on the target machine to accept traffic from the source linux box.



Leave a Comment:



We need collaboration and a real boost from our community: write us an email for every trick you find!

This website is a sysadmin swiss-knife for every-day Windows, Linux and Mac administration and troubleshooting

Our database grows if YOU send us your tips and trick as soon as you find them every day!