Clonezilla
Tips
When cloning filesystems, clonezilla
is good at only storing the
occupied blocks of each partition’s filesystem. If you might ever need
to restore to a smaller disk, spend the up front time to:
Boot to a Live Disk
Figure out how much space is actually in use:
df -h
Resize the filesystem close to that number (not so close that the machine is unusable from no free space)
resize2fs /dev/sda3 20G
Resize the corresponding partition to match the new size
fdisk /dev/sda
Delete partition
3
in this case, and create a new partition3
with the the default starting sector, and+20G
to match the above filesystem size.Create the clonezilla disk as usual. This allows the last partition to be grown and can often be done online.