2

There are tools such as Remastersys (and possibly also Linux Live kit) for creating custom distros and live Linux systems. Is it possible to use them to create a complete system backup, i.e. preserving all configurations, group policies, security settings, network configurations (proxies, VPNs) etc.? Down to what level of detail is the source system reproduced, is it just the /home folder + user packages, or is it equivalent to a complete clone/image of the entire hard drive incl. partition structure? Does disk encryption have an effect, e.g. having LUKS on LVM?

PS.: FWIW, here is a screenshot of gnome-disk with partition information.

  • Is it OK for you to shutdown your system and boot from another drive, for example a USB pendrive? In that case Clonezilla can do it for you. It is smart enough to copy only used blocks in the file systems (and skip free blocks), and there is compression, if you backup to an image. Clonezilla will also backup the bootloader and partition table. A clonezilla image is a directory with a set of files. – sudodus Jul 19 '20 at 19:53
  • @sudodus: Thx for this bit! If clonezilla also backs up the bootlader and partition table, would that make the image bootable? I.e. could I boot the backup directly from the pen drive? – david Jul 19 '20 at 19:56
  • 1
    Yes, it works. I have used this method for years, and I have restored from the backup to a fresh drive (of at least the same size, not one single byte smaller). Do not boot with both the original drive and the cloned copy connected - it can damage both systems! But when the original drive is removed, or if you restore from the backup to the original drive, it will boot (and behave exactly like the system that was backed up. But you boot from the restored system, which is usually not in a pendrive but in an SSD or HDD. – sudodus Jul 19 '20 at 20:00
  • 1
    Yes - The problem when both are connected is that they are identical, evem the UUIDs of the file systems, so there will be confusion. But when only one of them, the original or the cloned copy is connected, things will work correctly. – sudodus Jul 19 '20 at 20:09
  • 1
    Yes, it is smart enough to skip over the unused blocks in the file systems. The used blocks will be written at the correct locations. – sudodus Jul 19 '20 at 20:17
1

Clonezilla can create a complete image or cloned copy for you

Clonezilla is smart enough to copy only used blocks in the file systems (and skip free blocks), and there is compression, if you backup to an image. Clonezilla will also backup the bootloader and partition table. A clonezilla image is a directory with a set of files.

I have used this method for years, and I have restored from the backup to a fresh drive (of at least the same size, not one single byte smaller). Do not boot with both the original drive and the cloned copy connected - it can damage both systems! But when the original drive is removed, or if you restore from the backup to the original drive, it will boot (and behave exactly like the system that was backed up.

Instead of making a [compressed] image, you can clone directly to another drive (of at least the same size, not one single byte smaller). Then you can replace the original drive with the cloned copy and it will work just like the original one.

I think compression is automatic when you create an image, but when you clone directly, there will be no compression. (I think a cloned copy is a waste of drive space, so I store compressed images.) You pick the method that works best for you.

Finally, you should play safe - so test that you get everything correct, test that the backup really works now. Do not wait until the original drive fails, it might be too late to fix a failed backup

  • Thx! Btw, it would be interesting to see how skipping of free blocks and bootability goes together. Do I understand it correctly, that only the direct clone (requiring at least the same size target drive) is bootable, but not the compressed backup? – david Jul 19 '20 at 20:30
  • The compressed image itself is only a directory with some some files, but Clonezilla can restore a perfectly bootable cloned copy from that image into a target drive. This restored copy works in the same way as what is created by a direct cloning operation. If you have enough time, you can test both methods. – sudodus Jul 19 '20 at 20:35
  • With encrypted disk Clonezilla cannot identify free blocks, so there will be no speed up and no efficient compression. In other words, a compressed image will lose some of its advantages, and you might go directly to a cloned image. – sudodus Jul 19 '20 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.