Best clonezilla strategy?

Let us for the moment fix on the disk-image option in clonezilla - ie we are saving a compressed image file, not cloning a disk

The next important choice is between savedisk and saveparts
savedisk means image the whole disk including the mbr and the partition table
saveparts means image nominated partitions

Now , what happens if you need to do a restore?

  • from a savedisk image you can only restore everything . Every partition will be remade with the restored content. Good for when a whole disk is messed up, but not for if younwant to restore jusr some partitions. The size of the disk restored to must be same or larger than the size of the disk saved from.
  • from saveparts image you can restore one or several partitions, selectively. You cannot restore the mbr or the partition table, and the disk must be properly partitioned and formatted for the restore to work.
    You can restore a nominated partition from the image to a partition on the disk with a different label and of a different size, as long as it is big enough.

Now what is the best strategy?
It seems to me that I need to do both savedisk and saveparts to cover all contingencies.
If I had to do only one, it would be saveparts nominating all the partitions… I can always put the partition table and the partitions back with gparted if the whole disk is lost.

So what strategy do other clonezilla users adopt?

1 Like

Personally I use disk seeing it’s purpose is to create a backup image of a drive in case of failure.

Using disk is good because it creates an exact image of the source drive. If needed the backup drive can be swapped for the failed drive.

Backup parts is fun but not for bare metal recovery.

Ken

1 Like

Yes savedisk is better for drive failure or accidental disk wipeout
But if you just want to recover one partition, it cant… recovery will ovewrite all current partitions.

I guess one strategy would be to use savedisk with clonezilla and to snapshot partitions with something like timeshift.

Neville

If you save disk then can’t you copy a partition off it considering
it is an image of the source drive?

There is no command within clonezilla to do it
but
if you look inside the clonezilla savedisc directory you can see that each partition is a separate image file. So, in theory, you could take the image of one partition, feed it to clonezille somehow?, and restore it.

I have never tried it.
Maybe you would like to try writing a shell script to do it… It would be a useful thing to have.
Only thing is, it needs to be rock solid reliable.

Take up the challenge
Neville

I think, there is a general misconception in the idea how broad the spectrum of Clonezilla is. Clonezilla, if used as a backup mechanism, is there to perfectly restore a system, just as it was before. It does this and it does this very well. That’s it.

It’s not meant to upgrade to new systems or have sophisticated branched backup strategies, to do advanced backup cloning operations. This is out of scope and if possible, probably hard to achieve. However, I wouldn’t recommend to do that in general, because it’s trying to punch in nails with a crowbar, instead of putting your hand into the toolbox again, to take out a hammer.

I’m also not sure, why seemingly everyone almost narrow-mindedly stiffens up on the idea of using Clonezilla as a backup tool for everything.
To make the basics clear regarding Clonezilla:
Clonezilla clones disks. The side-effect of doing that, is that this can be used to perfectly back up disks with Linux installation on them. That’s it. It’s nothing more. Nothing less. Clonezilla is not a backup solution per sé. It’s a cloning solution and cloning is one of many different backup strategies.

Probably, one of the major reasons why people use it all the time, is because it’s the easiest to understand. The only backup strategy that is even easier than cloning is using cp or rsync without special options.
All other backup solutions are slightly harder to grasp and have sometimes sophisticated tactics evolved, to optimise the backup process.

Speaking of optimisation, cloning an entire disk for backup purposes is EXTREMELY inefficient. It is seriously extremely inefficient. It can’t get worse than that. With an entire disk clone, you back up EVERYTHING. Even the most unimportant and ephemeral stuff you can imagine on a computer. You literally even back up your trash bin. Just saying.

So, if you have anything of real importance to back up, it is almost always worth to look into optimised backup solutions, especially if you are not a company which can afford buying 100 HDDs just for backup purposes. It is worth the effort, even if it is slightly more difficult to understand than just a plain cloning solution, which copies an entire disk or partition, bit by bit.

I already mentioned a couple of times the solution I am using on this forum, hoping people would start using an actual backup solution. In this case it even covers almost every option/request a user might have, except the bit by bit thing a cloning solution offers.

However, people continue to use Clonezilla, as it seems, as a primary backup solution and this thread also underlines the fact that Clonezilla is viewed as some kind of ultimate solution to having your system backed up properly. But it’s not. Cloning a system is like the second or third additional backup option you should most likely use. The first one should be an optimised, organised and reliable true backup solution.

The ironic thing about Clonezilla backups is, that it’s extremely reliable, as long as you are restoring to the same system. However, if you are restoring to a modified system, with a different disk and/or boot setup, the Clonezilla backup suddenly loses most of its worth.
If one would use a classic solution, starting with rsync or something more sophisiticated, like the aforementioned solution I am personally using everywhere, then all cases would be covered, except the bit by bit cloning one. However, in most cases the bit by bit cloning backup solution is not needed. It is convenient, if you break your Linux every week. That’s true. But in most real world backup restoration scenarios, there is rarely a case where you actually need an entire disk backup, which backed up everything; even your trash bin.

And if backing up the boot sector on a disk is of such importance, that people use Clonezilla for it – don’t. Just back up the sector, the /boot and the esp partitions itself. This way, you have the whole Linux boot setup backed up, without having hundreds of Gigabytes wasted for useless operatings system bloat.

1 Like

I like it,
but I cant see a clear path for me just yet.
I probably need more system backups than the average user
but I think I have data backups under control.

Your Borg option is being considered

Neville

1 Like

Cloning a disk for backup purposes is not bad. It just shouldn’t be the primary backup solution, a user uses. It’s a secondary or tertiary backup strategy. But not a primary one.

1 Like

As I recently discovered, any backup is a long way better than none.

This topic was intially just about best way to use clonezilla. I think we have the answer… savedisk is a complete clone. And use something other than clonezilla if you want what saveparts offers.
Thanks
Neville

1 Like

Hi Neville, :wave:

I was asking myself this very question a long time ago. I like clonezilla a lot and I think it´s a very good means for backup puposes.
So I took my question to askubuntu and found out it can be done. :blush:

If you create a disk-backup (i.e. all partitions, MBR) everything is saved, it is true.

But having that image available you may restore a single partition exclusively if need be.
Actually (if I recall correctly) I in fact tried it out of necessity and it worked. :+1:

The discussion I initiated at the time is located here: lubuntu - clonezilla partition-backup - Ask Ubuntu .

The gist of it - more or less - is:

Q:

I realized that when making a disk-backup clonezilla does that in 2 steps: First my /-partition and second my /home-partition.

My question now is: Does anyone know whether there´s a possibility of playing back only my /home-partition if need be provided that I´ve just a disk-backup available (which consists of / and /home-partition)

A:

You have the same feature in Clonezilla for restoring as you have for the backup.

When you’re backing up the choices are:

  • savedisk - Save the whole disk
  • saveparts - Save partitions

When you are restoring you have the same options:

  • restoredisk - Restore the whole disk that was saved
  • restoreparts - Restire partitions from the disk that was saved

To restore a single partition just go into the restoreparts option and browse to where you saved your disk. Then use the selector to pick the partition you want to restore.

Q:

But… can the user perform a “disk to image” backup, and do a “specific partition only” restore?[…]

A:

Yes. The save or restore will go to whatever he choose as his source and destination. If he choose image for save. He would have to use that image for restore.
The restore will have to come from where it was saved… and the option to choose the source and destination is part of the save and restore process.

Q:
The question, rephrased, is… the user does an entire disk to image backup, and his /home is on sda5, can the user go back later to that image, and only restore sda5? Or, does partition to image backups make more sense?

A:

He select restoreparts, then proceed to where he wants to restore it to. Then he proceeds to where he’s going to restore it to. If it’s a device (a drive) then Clonezilla will give the list of partitions on the drive as part of the process. He will then pick the partition on that device (drive) and proceed with the restore.

As I said I once successfully restored a partition (I think it was the root partition) from complete disk-backup/disk-image. :blush:

Hope it helps.

Many greetings
Rosika :slightly_smiling_face:

1 Like

Hi Rosika…
You have solved it. Great.
I have the ideal setup right at the moment to test it out. On my small desktop I have both a savedisk backup, and a saveparts backup.
I will try and restore a single data partition from the savedisk backup.
I believe you, but these are backup strategies… we need to be sure.

Regards
Neville

1 Like

@UnixGuy ,
Hang on with that. It seems I am wrong… @Rosika says you can do it

I will try doing it and let you know

Neville

1 Like

OK I did the trial at recovering a single partition from a savedisk clonezilla image.
THe answer is… Yes it can be done. I did not know that so thanks to @UnixGuy and @Rosika

Details
Start Clonezilla as normal, choose the /home/partimage device, and go down to
beginner
then choose
restoreparts
then it says “choose the image file to restore from” , so I put
2022-01-20-11-img-savedisk-img
then it says “choose the partition from the image file to be restored” and I put
sda4
then it says “choose target partitions to be overwritten” and I put
sda6
sda4 is Debian Linux, and sda6 is another empty partition of equal size
Then there are lots of messages, and I have to say “yes” twice, but it does it
Come out of Clonezilla.
Boot Debian and check

  1. I can mount sda6 and it has files that look like Debian on it
  2. Run os-prober and it finds Debian on sda6
  3. Do update-grub ( This is in the original Debian on sda4)
  4. Reboot and can login to either Debian … try the one on sda6 and it runs.

So Clonezilla has even patched up the entries in /etc/fstab bacause my restored OS is instantly bootable.

OK. Happy with that. Reformat sda6 to get rid of the extra copy of Debian , redo update-grub, and I am back to normal.

So the final word on Clonezilla strategy seems to be

  1. Use savedisk . It covers both total failure and recovering a single partition
  2. Use saveparts only if you want a rapid backup of a single partition, eg when updating Linux. Important for rolling release distros.

Thanks to all,
Neville

1 Like

Hi Neville, :wave:

thanks a lot for you detailed account of how to proceed. :heart:
It´s certainly a good reference for anyone for getting things done the clonezilla way.

I´m glad it worked out for you as well.

Many greetings
Rosika :slightly_smiling_face:

1 Like