How to Clone or Backup Linux Disk Using Clonezilla

Clonezilla is one of the greatest Open Source backup tools for Linux. The absence of a Graphical User Interface combined with a simpler, fast, and intuitive guided command line wizard that runs on top of a live Linux Kernel makes it a perfect candidate back-up tool for every sysadmin out there.

With Clonezilla, not only you can perform a full backup of a device data blocks directly to another drive but also known disk cloning, but you can also backup entire disks or individual partitions remotely (using SSH, Samba or NFS shares) or locally to images which can be all encrypted and stored in central backup storage, typically a NAS, or even on external hard-disks or other USB devices.

In case of a drive failure, the backed-up images can be easily restored to a new device plugged-in into your machine, with the remark that the new device must meet the minimum required space value, which is at least the same size that the failed backed-up drive had.

In simpler terms, if you clone a 120 GB hard-disk which has 80 GB free space, you can’t restore the backed-up image to a new 80 GB hard-drive. The new hard drive which will be used for cloning or restoring the old one must have at least the same size as the source drive (120 GB).

In this tutorial we are going to show you how you can clone a block device, typically a hard-disk on top of which we run a CentOS 8/7 server (or any Linux distribution such as RHEL, Fedora, Debian, Ubuntu, etc.).

In order to clone the target disk, you need to physically add a new disk into your machine with at least the same size as the source disk used for cloning.

Requirements

  1. Download Clonezilla ISO Imagehttp://clonezilla.org/downloads.php
  2. New Hard Drive – physically plugged-in into the machine and operational (consult BIOS for device information).

How to Clone or Backup CentOS 7 Disk with Clonezilla

1. After you download and burn Clonezilla ISO image to a CD/DVD, place the bootable media into your machine optical drive, reboot the machine and press the specific key (F11, F12, ESC, DEL, etc) in order to instruct the BIOS to boot from the appropriate optical drive.

2. The first screen of Clonezilla should appear on your screen. Select the first option, Clonezilla live and press Enter key to proceed further.

Clonezilla Boot Screen
Clonezilla Boot Screen

3. After the system loads the required components into your machine RAM a new interactive screen should appear which will ask you to choose your language.

Use up or down arrow keys to navigate through the language menu and press Enter key in order to choose your language and move forward.

Select Clonezilla Language
Select Clonezilla Language

4. On the next screen, you have the option to configure your keyboard. Just press Enter key at Don’t touch keymap option to move to the next screen.

Configuring Console-data
Configuring Console-data

5. On the next screen choose Start Clonezilla in order to enter the Clonezilla interactive console menu.

Start Clonezilla for Interactive Menu
Start Clonezilla for Interactive Menu

6. Because in this tutorial we are going to perform a local disk clone, so choose the second option, device-device, and press Enter key again to proceed further.

Also, make sure that the new hard-drive is already physically plugged-in intro your machine and properly detected by your machine.

Select Disk to Clone
Select Disk to Clone

7. On the next screen choose Beginner mode wizard and press Enter key to move to the next screen.

If the new hard disk is larger than the old one you can choose Expert mode and select -k1 and -r options that will assure that the partitions will be proportionally created in the target disk and the file system will be automatically resized.

Be advised to use the expert mode options with extreme caution.

Select Beginner Mode for Disk Cloning
Select Beginner Mode for Disk Cloning

8. On the next menu choose disk_to_local_disk option and press Enter to continue. This option ensures that a full disk clone (MBR, partition table, and data) with the same size as the source disk to target disk will be performed further.

Select Disk to Local Disk Cloning
Select Disk to Local Disk Cloning

9. On the next screen, you must choose the source disk that will be used for the clone. Pay attention to disk names used here. In Linux a disk can be named sda, sdb, etc, meaning that sda is the first disk, sdb the second, and so on.

In case you’re not sure what’s your source disk name you can physically examine the source disk name and serial No, check SATA port cabling on the motherboard, or consult the BIOS in order to obtain disk information.

In this guide we’re using Vmware Virtual disks for cloning and sda is the source disk that will be used for cloning. After you successfully identified the source drive press Enter key in order to move to the next screen.

Select Linux Disk to Clone
Select Linux Disk to Clone

10. Next, select the second disk that will be used as a target for cloning and press the Enter key to continue. Proceed with maximum attention because the cloning process is destructive and will wipe all data from the target disk, including MBR, partition table, data, or any boot loader.

Choose Local Disk as Target Cloning
Choose Local Disk as Target Cloning

11. If you’re sure the source file system is not corrupted you can safely choose to Skip checking/repairing source file system and press Enter to continue.

Next, the command used for this cloning session will be displayed on your screen and the prompt will wait for you to hit the Enter key in order to continue.

Skip Checking Source Filesystem
Skip Checking Source Filesystem

12. Before starting the real process of disk cloning, the utility will display some reports concerning its activity and will issue two warning messages.

Press y key twice to agree with both warnings and press y key the third time in order to clone the boot loader on the target device.

Confirm Disk Cloning Warning Messages
Confirm Disk Cloning Warning Messages

13. After you agreed with all warning the cloning process will automatically start. All data from the source drive will be automatically replicated to the target device with no user interference.

Clonezilla will display a graphical report regarding all data it transfers from a partition to the other, including the time and speed it takes to transfer data.

Clonezilla Linux Disk Cloning Process
Clonezilla Linux Disk Cloning Process

14. After the cloning process finishes successfully a new report will be displayed on your screen and the prompt will ask you whether you would like to use Clonezilla again by entering the command line or exit the wizard.

Just press Enter key to move to the new wizard and from there select poweroff option in order to halt your machine.

Clonezilla Linux Disk Cloning Completed
Clonezilla Linux Disk Cloning Completed
Poweroff Machine
Poweroff Machine

That’s all! The cloning process is finished and the new hard disk can now be used instead of the old one after it has been physically detached from the machine. If the old hard drive is still in better shape you can store it in a safe location and use it as a backup solution for extreme cases.

In case your CentOS File System Hierarchy spawns multiple disks you need to make sure that each disk in the hierarchy is also duplicated in order to backup data in case if one of the disks fails.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

Matei Cezar
I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

13 Comments

Leave a Reply
  1. Thanks for the detailed tutorial. My Ubuntu 20.04 LTS Unity is on a 120GB SSD and I want to clone it to a new 250GB SSD and then install the new SSD in my machine using “expert mode” to adjust partitions to the larger drive and boot from there in future. Am I on the right track?

    Reply
  2. Love Clonezilla, and use it a lot on an Ubuntu 18.04 machine. But does anyone know of another true cloning software that will clone to a slightly smaller drive? I have a new 1Tb SSD that is about 3 bytes larger than the 1Tb HDD I replaced, that still works great but isn’t as fast as the SSD. I would just like to keep a complete backup on the old drive, just in case…

    Reply
  3. For a much easier to use drop-in replacement to Clonezilla, checkout “Rescuezilla“.

    Rescuezilla is a Clonezilla GUI/frontend: Clonezilla can restore images created by Rescuezilla and vice versa!

    Reply
  4. Can I use the Clonezilla for making incremental snapshots and do it on the schedule?

    Can I use the Clonezilla for daily copy any certain folders only, not the whole disk? It there a desktop version of Clonezilla, i.e. Clonezilla client?

    Or is this tools only for clone purpose?

    Reply
  5. I’m pretty sure you really mean to say “you can’t restore the backed-up image to a new 60 GB hard-drive” instead of “you can’t restore the backed-up image to a new 80 GB hard-drive” as you really wanted to point out that you cannot only clone the occupied space but also the free space.

    Reply
  6. I used clonezilla and will have to do it again. I cloned a 2tb to a 4tb and now Linux Mint says I have a 2tb hard drive. I would like to clone, but for Mint to report a 4tb hard drive. What did I do wrong?

    Reply
    • Donovan Keith,

      The solution I’ve used on an Ubuntu machine (works the same on Mint) is to use Gparted and just re-size the partition on the new machine. You’ll get warnings that you risk damaging the data, but I’ve never had an issue. I guess the worst that could happen is that you’d have to start over! -which I had to do once…no biggie…

      Reply
  7. Hi, I ran into trouble with a clone (Macrium Reflect) of a Windows machine (7 updated to 8.1) dating from 2013. It seems the problem is related to the UEFI boot system (which can also make double-booting difficult for non specialists). The solution requires you to have boot from the rescue media, … which all of us think of preparing in advance and storing somewhere we can find it…
    http://kb.macrium.com/KnowledgebaseArticle50168.aspx
    I wanted to know if you might need a separate boot CD or key when cloning an exclusively Linux machine that has UEFI.
    It’s necessary to be quite clear about this for ordinary users, because though the best advice is always to test your cloned copy before putting it in the cupboard, people might be tempted not to do that because they don’t feel confident enough to open up and so risk damaging their computer.

    Reply
    • Clonezilla should do just fine even cloning a version of Windows. The problems occur only when the cloned disk is moved to other machine than the one being cloned, especially if you move the drive from a BIOS machine to a UEFI computer. All you need in order to use Clonezilla is just a CD image or a USB bootable drive to boot from. At the first screen of Clonezilla you even have the option to completely load it into RAM and remove the bootable media.

      Reply
  8. I don’t really understand your issue? I’ve cloned a drive and placed it in a new machine, since you are mentioning something about a new kind o BIOS, i guess? When you install an OS (Windows, Linux or other), that OS is specifically tailored on your machine components. If you move the hard disk (or a drive clone for that matter) in a new machine, there’re chances that the OS won’t boot anymore!

    Reply
  9. A couple of years ago I discovered to my cost that you could no longer boot a PC (Windows, at least) from a clone, because of some madness to do with the new kind of BIOS. The only solution was to make an image and a boot CD or USB key, and restore the image to the new disk. Please could we have an update on this situation?

    Reply
    • I recall a similar rule, one cannot perform sector to sector clones on Windows computer with GPT partitioning (UEFI). Believe that’s where Christopher Lee is coming from, one of the values (or partition identifiers) must be unique to be usable, though since I also use Macrium, have read some articles on this. Am not 100% for certain which of the partitions (probably one of the first three small ones) that MUST not be cloned sector to sector. Rather a ‘Smart’ clone that knows how to workaround the issue.

      However, the focus here is cloning Linux, is a non-dual boot, do these OS’s have the same partitions(s)?

      Cat

      Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.