This question already has an answer here:
What's the best way to backup a USB drive with bootable data on it? For instance, I have what's called an ESXi server on a bootable USB, it's basically a linux variant with multiple partiions. What's the best way to back it up in case the original USB drive fails and the server needs to be put back together in a hurry?
It seems my desires are:
- 1 Keep the backup solution as simple as possible
- 2 Keep system online for when system files are routinely backed up
- 3 Make drive replacement easy
So with dd alone, criterion 1 and 3 are met possibly with...
sudo dd if=/dev/sdc | gzip > /storage/backups/esxi-usb-backup-2014-nov.gz
but someone on the internet criticized using dd due to geometry not being garanteed between drives. I didn't really understand what they meant because they were inarticulate, but I understand that a replacement drive of the same spec as the original may contain more bad sectors than the original and thus may not be able to fit all the partitions from the original on it. Is that what he meant? Would a workaround be to only allocate 80% of the thumb drive to leave slack for bad sectors? That's still an option at this point I believe.
If 1 and 3 are met with DD, then I can use ssh and rsync the file system to a backup location, then when the USB drive eventually dies, I can flash a new drive using the dd image, and then rsync the files over thereafter, accomplishing 2 and 3 (but not really achieving 1).
Does anyone know of a more practicle solution?