#StackBounty: #backup #disk-image #ext4 #rescue-disk #sparseimage How to create sparse, bootable Linux backup images?

Bounty: 50

I’ve set up a new Linux workstation and would like to create a backup image in order to save time in case something breaks. This is the situation:

  • Workstation: 512 GB SSD, 12 GB used, ext4 file system, may contain bad blocks
  • Backup drive: 64 GB USB flash drive

The backup image should be bootable for the added flexibility of being able to carry around and start the workstation system from any compatible host computer. All programs, configurations, network settings (proxies, VPNs) etc. should be preserved.

As I understand, a sparse, file-based image will be necessary, since the backup drive (and possibly also the replacement drive) is smaller than the source drive.

What is a good way to do this? AFAIK, dd just copies bit by bit and ddrescue can only sparsify blocks of zeros into metadata, but not unused space filled with random data. Some disk cleanup tools offer to fill unused space with zeros, but this usually takes many hours and I’m not sure if this is good practice for collapsing data.

I need a reliable, free, and easy solution as I don’t have any expertise on file systems, partition structures, boot sectors etc.

Get this bounty!!!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.