I have a PC with 32GBs of RAM running Linux Mint 20. As per instructions found here (which were meant for 19, but appear to work for 20), I have increased my swapfile to just a little larger than my total physical memory:

username@hostname:~$ ls -lh /swapfile 
-rw------- 1 root root 34G Nov  2 18:05 /swapfile

I like to image my disk when it has a well set-up install of my OS, so that I can revert back to it should things stray. I use a Clonezilla Live USB for this, and (following the instructions of Clonezilla to select default choices if you don't know any better) select default/simple choices. I work with images_disks, I choose a folder on an auxiliary drive as the root where images will be saved to, I choose the savedisk option, and the default compression algorithm. I then let Clonezilla do it's thing. I don't want to image just the partition, because the point of the restore may be to fix the whole disk.

My drive has about 156G used on it, according to df, but of course the resultant image is smaller than that. In part due to compression, but is Clonezilla smart enough to ignore my swapfile? I've heard (and now can't find where) that it will ignore a zerofilled (ie one that doesn't have a hibernation saved to it) swap partition, but will it inspect the drive closely enough to do the same with a file, before copying it? If not, would switching to a swap partition, rather than swap file, help?



1 Answer 1


Switching from swap file to swap partition will give you the option to select for backup only the partition where is located the information. I am not sure Clonezilla is smart enough to recognize swap file and ignore it.

About the size of swap - it depend of the apps you use but if its some ordinary apps like browser, office, editors, develop huge swap will not be so helpful.

  • I should have mentioned in the original post that I want to image the whole disk, in case I am restoring because of a corrupt partition table, and so on. The swap is the size that is because I want to hibernate, and that's how much RAM I have. Commented Nov 2, 2021 at 18:56
  • @DuncanMarshall, I get it about the size. But instead of clone entire disk you can clone only the partitions with real information and make backup of partition table (which will be several kb in size) Commented Nov 2, 2021 at 19:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .