Score:0

Ubuntu ZFS - backing up whole system before upgrading to 22.04?

il flag

I have Ubuntu 20.04 with ZFS installed and I want to upgrade to 22.04.

I would very much like to avoid breaking my system, because it's important enough for it to keep running. My data is already backed up, that's not a problem, but just re-installing and setting up everything requires a lot of time to be to my liking.

How should I go about backing up whole system, and in case of breakage restoring it?

  1. Should I use ZFS snapshots? And how?
  2. Or should I use Clonezilla?
  3. Something else?

Thanks

in flag
I generally use snapshots as it allows for relatively simple rollbacks when things fail. That said, I’ve never done a rollback of an entire LTS upgrade
Score:0
pf flag

For something as big as a system upgrade, I would make an image of the entire drive:

  1. (With power off) Attach large-enough drive to system.
  2. Boot using live USB or similar
  3. Using "Disks" utility, create disk image on backup drive.

(I'm pretty sure it's just a front-end for dd, but it's a nice easy-to-use front end.)

Nemanja TT avatar
il flag
I used Clonezilla to clone whole disk to USB storage.
Gary avatar
pf flag
Clonezilla is good, too. Just so long as you have something you can go back to if things go sideways.
Score:0
vc flag

I use some variation of the below to back up a whole disk

dd if=/dev/sdX conv=sync,noerror status=progress bs=64k | gzip -c > backup_image.img.gz

You can use a different compression program other than gzip if you want. You may also want to fill empty space with zeros or use sparse command in dd to make the compressions really work (you can google how to do this). Put the backup image and copy to an external drive or non-system drive.

Just reverse the two arguments to restore (after you have unzipped your image)

dd if=path/to/backup-backup.img of=/dev/sdX

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.