1

I have a Debian 12 system that I want to backup using clonezilla.

This system is using LVM and a bunch of little partitions. Some using ext4, and some in xfs.

The issue, is that, if I don't do anything special, and use exclusively the gui, clonezilla stop the lvm manager before doing a backup and switch to raw mode to save the disk.

Resulting in a quite long backup process and quite long restore process.

The image is small compared to the disk size (512GB save to a 17GB file).

Why clonezilla don't want to save each lvm partition ?

Do I have to ask clonezilla to backup each lvm partition, and use a custom restore script where I create the lvm volume myself before issuing a bunch of restore commands ?

Is there a way to make this backup more efficient ?

Best regards.

asked Aug 11 at 12:14
12
  • 1
    I mean, the moment you write a custom restore script, you might as well just pipe your LVM volumes to zstd -6 and do the backing up yourself. Commented Aug 11 at 13:04
  • 2
    If this is on an SSD, and if you're not doing that already, I'd strongly recommend running fstrim on every mountpoint prior to backing up – zeros are much much faster to read, compress nearly instantly, and need nearly zero space in your backup file. (if you suspect you have some unused space that's not trimmed in the unallocated free space of your volume group, you can make a new volume that uses 100%FREE, and then blkdiscard that new volume, and then delete it.) Commented Aug 11 at 13:05
  • I use a custom script that create a big file full of 0 and delete it before doing the backup. Commented Aug 11 at 13:18
  • 2
    that's a bad thing to do; it's in fact counterproductive, as it might mark empty blocks as used. Instead, fstrim. Commented Aug 11 at 13:39
  • 1
    @iXô on a hard drive it makes no difference – reading or writing an all-zero block takes as long as reading or writing one filled with random data. So, you can just do nothing and get the same result :) Commented Aug 11 at 15:40

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.