Cloning and ghosting with Linux: Clonezilla

There are various solutions for making a clone/ghost of a partition or a disk.
Among the free ones, CloneZilla provides an integrated and powerful method of cloning devices also via network. Check it out.

I need some disk cloning/ghosting/dumping software.
Few personal searches made me test Windows or Linux based solutions.
No good results.

Until a good hint tickled in the air (thanks Elia), somehow by chance, after a discussion on backup and recovery procedures.

Clonezilla
http://clonezilla.sourceforge.net/

Free as in GPL.
Linux and Windows (also NTFS) filesystems supported.
PXE saving and recovering, with option of a massive multicast network cloning.
It binds together partimage, ntfsclone, dd and other tools.  
Supported filesystems (the ones that count) have an optimal file oriented compression.
With drbl-winroll (from same authors) you can change hostname, group, and SID of cloned Windows machines

Handy Clonezilla live CD for immediate use:
You can save or restore a local partition or disk on another local device, a SSH/CIFS/NFS server.

Let's see it action.

23.25
Boot Clonezilla Live 1.0.7.
Language choice is between English and Traditional Chinese.
First choice for me.
Seems a Debian based live distro.
No frills text interface, a-la Debian Installer.

It asks for the keyboard layout.
It asks if you want to start CloneZilla or launch a shell [CloneZilla]
It asks if you want to clone/restore your local drive/partition to an image file or another drive/partition.
It asks where is placed the image to restore or where to place the new image (local device, ssh, samba, nfs).
If you chose a network file systems it configures your ethernet card.
It asks what you want to do: save or restore a disk or a partition.
It lets you decide various (userful and powerful) options related to how to save and, most important how to recover filesystems and images.  
 

23.32
Start cloning.
250 Gb Hard Disk, with Windows Vista installed.
About 20 Gb used space. NTFS.
Ssh via a RTL8169 Gigabit Ethernet NIC.
Using gz compression (default choice).
Server has a gigabit interface too.

23.47
Fifteen minutes later.
On the ssh server (alpha): 4,5 Gb, splitted in 3 files:

[root@alpha ~]# du -h /data/gamma-img/
4.5G    /data/gamma-img/

[root@alpha ~]# ls -l /data/gamma-img/
total 4639600
-rw-r--r-- 1 root root          4 Jan 17 22:53 disk
-rw-r--r-- 1 root root          5 Jan 17 22:53 parts
-rw------- 1 root root 2097152000 Jan 17 22:44 sda1.ntfs-img.aa
-rw------- 1 root root 2097152000 Jan 17 22:51 sda1.ntfs-img.ab
-rw------- 1 root root  551940948 Jan 17 22:52 sda1.ntfs-img.ac
-rw-r--r-- 1 root root         37 Jan 17 22:39 sda-chs.sf
-rw-r--r-- 1 root root        512 Jan 17 22:39 sda-mbr
-rw-r--r-- 1 root root        259 Jan 17 22:39 sda-pt.sf


[root@alpha ~]# cat /data/gamma-img/disk
sda
[root@alpha ~]# cat /data/gamma-img/parts
sda1
[root@alpha ~]# cat /data/gamma-img/sda-chs.sf
cylinders=30394
heads=255
sectors=63

[root@alpha ~]# cat /data/gamma-img/sda-pt.sf
# partition table of /dev/sda
unit: sectors

/dev/sda1 : start=     2048, size=488275968, Id= 7, bootable
/dev/sda2 : start=        0, size=        0, Id= 0
/dev/sda3 : start=        0, size=        0, Id= 0
/dev/sda4 : start=        0, size=        0, Id= 0

23.57
Have to try a restore procedure.
Reboot the Vista installation.  
Works again (never doubted :-).
Change minor things on the desktop, to differentiate from the saved image.

Reboot CloneZilla live CD.

From the menus I choose to restore from an SSH server.
It mounts (connected as root) but it doesn't seem to see the images.
A quarrel with Zilla.
Sshfs mounts the previous location, but Clonezilla doesn't find any restored image.
Wonder if it's a matter of permissions, doesn't seem.
Change net protocol, Samba up and CIFS mount.
Some tries.
I tried to mount directly the image directory ( /data/gamma-img/ ), wrong.
Must mount the parent directory, Clonezilla shows available images at disposal.
I realize I've lost all this time trying to mount (via ssh or samba) directly the directory containing the dumped files, and not the parent directory, from where you can chose the list of directories/clones to recover.

00:28
Starting restore of gamma's sda from the previously saved image.
Via CIFS.

00:33
Image restored.
Only 5 minutes for recovery.

00:36
Windows rebooted.
Image well restored.
I Love Clonezilla.



Time passes. Things gone.
Prepared an updated, and averagely tuned Windows host.
Installed Firefox+Firebug,
Downloaded on a shares of alpha drbl-winroll:
http://drbl-winroll.sourceforge.net/


03:40
Start a new clone.
The Windows used size is now 30 Gb (as says explorer) or 19211 Mb, in Clonezilla count.
Try with bz2 compression, slower but more efficient.
Much slower.
Ten minutes later only 10% is completed.

No way to wait.
Good night ol' Zilla.


10:51
Coffee and Clonezilla for breakfast.
Cloning completed. Time elapsed 74.778 mins. Average speed 252 MB/min.
Space used on backup server: 5.2G
Bzip2 vs gzip? I think I'll use the latter in future.

Restore times: time elapsed 23,979 mins. Average speed: 798 MB/min

Have a good day.

Privacy Policy