I’ve used Clonezilla a few times in the past, its a quick and convenient way to replace a hard disk (e.g. upgrading from a spinning rust disk to an SSD) in your machine without needing to rebuild the OS from scratch.
But Clonezilla can also be used to clone the disk to an image, as a point in time backup. You can then use this image to restore your machine to a HDD or SSD that is the same size or larger than the original. Just having this as a fall back is a great way to save yourself time if the drive in your machine was to fail or the Operating System becomes unbootable for some reason.
The below instructions are not a comprehensive overview of using Clonezilla, they are more a quick cheat sheet of what I use to make quick image backups of my main desktop machine to a share on my Synology NAS periodically so I at least have something I can restore from in a hurry if the worst was to happen.
Download and Prepare Clonezilla Live
I prefer to use the Clonezilla Live bootable USB, but you can also burn onto a CD if required. You can get Clonezilla from: https://clonezilla.org/
I’d recommend creating a simple share on your Synology NAS, i.e. something like “scratch” or “images”, so you can easily get to it. You should also be able to use your hostname, but also its worth trying IP address.
So in my case the UNC path is: \\192.168.100.10\scratch\images
The share name is “Scratch”, then I created a folder underneath called “images” for the images to go into. I recommend no spaces and all lower case, it just makes things easier to not worry about capitals and escaping things!
Boot Using Clonezilla
First power off your machine, insert the USB stick or CD ISO image. And then boot your machine.
At this point you may well need to be quick, you’ll want to get into your machine’s boot menu to select to boot off the image. Once selected wait while the Clonezilla Live boots to a menu screen.
You can stick with the default “Clonezilla Live” so just hit Enter, and then wait for it to boot into the menu.
Preparing Environment
The following steps will just be a quick run through of the steps to get an image done.
- Select your language, in my case this was en_US.UTF-8 English.
- Keep the default keyboard layout unless you have a reason not to.
- Select “Start_Clonezilla” and hit Enter.
Prepare for Image Backup
- Select “device-image” and hit Enter. This means you will be taking a copy of the HDD and turning it into an image file.
- Select “samba_server” and hit Enter. Of course you need to ensure that you have share prepared already on your samba server.
- Ensure your machine is connected to the network and hit “dhcp” or if you wish set a static IP.
- You’ll now be prompted to “Mount Samba Server”, this is easy, all you need to do is enter the IP address of your NAS. In my case this was 192.168.100.10.
- Now you’ll be prompted for the “Domain in the samba server”, now assuming you are not using AD or have any things like that you can just hit “Cancel” and carry on.
- You now need to provide the account for logging onto the share you created, in my case I just use my normal account, but you may just want an account you use for imaging. Then hit Enter.
- The directory where Clonezilla will be saved dialog is a bit unclear. What it is actually asking for is the “Share Name” (and “Sub Directory” if you want to have one), so in my case this should be set to /scratch/images.
- When prompted for SMB protocol version, just “Auto” unless you know of any reason not to. And hit Enter.
- Again use “Auto” for the security mode, unless you know any reason not to. Then hit Enter.
- You’ll now need to enter your password for the username to connect to the share. You’ll also see the path that Clonezilla will be writing to, in my case this showed up as “Username”@192.168.100.10:/scratch/images.
- You’ll get an output showing the volume information, you can verify this looks correct and then hit Enter to continue.
- Your machine will now check for the various drives and then you’ll be prompted for the method. In our case this is a simple set of instructions choose “Beginner” and hit Enter.
- Now select “savedisk” which takes your local disk (HDD) and saves it as an image. Then hit Enter.
- Now you can enter a name for the image, this is actually a directory which will contain lots of images files, I typically stick the hostname of the machine on the front for easy identification, so it looks something like this: MACHINENAME-2022-01-17-21-img, then hit Enter to continue.
- Now this can be a bit tricky if you have more than one disk. You can if you wish image loads of your local disks all at once, in my case I just have one disk sda, so I hit space to put an asterisk * in that option then move to OK, or hit Enter.
- When prompted for compression, stick with the default “-z1p” then hit Enter.
- IMPORTANT! Now this step you need to be careful with, if you are cloning NTFS, as I am here, you MUST skip checking. So select: “-sfsck Skip checking/repairing source file system”, then hit Enter.
- Now when it comes to checking the saved image, this is up to you, i’m selecting “-scs No, skip checking the saved image” but you may want to get Clonezilla to double check the image after it has been created to ensure it has been correctly saved. Hit Enter to continue.
- In my case I don’t need the image to be encrypted, so select “-senc Not to encrypt the image”, then hit Enter to continue.
- Now you can set what happens at the end of the task, I’ll want to be presented with some options, so select “-p choose”, but sometimes you might just want it to image then power off instead, so just select that if you need. Then hit Enter to continue.
- You see a command line built up, this is essentially what you have been preparing, just hit Enter to get started.
- After a few moments, you’ll get a dialog appear that shows the cloning process underway. In my case I selected only to image /dev/sda, however oddly the wizard showed imaging all the drives on my machine, but it just carried on and only imaged the one disk.
- This step may take a while, so go and get a cuppa, for me a 128GB SSD which is about 90% used took about 20 minutes with a 1Gbit network connection.
- Once complete, check all is well, then hit Enter, and then select “Poweroff” and hit Enter, wait for your machine to halt and then remove the USB drive or CD ISO image.
That’s it you’re done, I’ll write a how to restore guide at some point!