This page aims to sum up the way of doing clone of Debian machines.

Partclone

partclone allows to clone and restore partitions. It cannot clone in live (the partition must be umounted). In order to clone a entire system, you need to use a LiveUSB to clone (systemrescue or clonezilla for instance)

To clone a partition

To clone an ext4 partition in a file :

partclone.ext4 -c -s /dev/sda1 -o ~/pc1.img

To clone an ext4 partition to a SSH server, compression the image with Gzip:

partclone.ext4 -c -s /dev/sda1 |gzip -c |ssh adrien@serveur 'cat > ~/pc1.img.gz'

To restore a partition

To restore from a file:

partclone.ext4 -r -o /dev/sda1

To restore from the SSH server:

ssh adrien@serveur 'zcat ~/pc1.img.gz' |partclone.ext4 -r -o /dev/sda4


CategorySystemAdministration