Score:0

Is dd for /boot and LVM snapshot for root logical volume the proper strategy for full backup of UEFI PC Ubuntu Server?

gb flag

I'm planning to create full backup of my Ubuntu Server installation in UEFI mode on 512GB disk. There is one mandatory UEFI Parition (1GB), /boot is standard EXT4 separate boot partition (2GB) and the rest of the disk is big LVM physical volume (~509GB).

  • One Volume Group is defined eg. vg-root of size ~509GB
  • One Logical Volume is defined eg. lv-root of size 200GB.

System is installed, kernel & packages up-to-date, all good. I plan to create at this "clean" point of time full backup of the system using LVM snapshot functionality.

I will create lv-root-snap with size of 200GB and boot partition backup "dd if=/dev/BOOT_PARTITION_DEVICE of=boot_backup.dd". From now on there may be many changes,updates and so on. Also new kernels may be installed as time goes on, usual stuff in Ubuntu OS.

In the future I plan to "go back in time" by restoring boot partition with reversed dd command and lv-root from snapshot lv-root-snap.

I'm planning to follow those steps during my future restore procedure:

  1. Unmount /boot parition
  2. Execute reversed dd of boot parition backup (so after this we have original kernels in boot parition, /boot remains unmounted at this moment)
  3. Restore lv-root from lv-root-snap (it will be scheduled for next restart as this is mounted active root partition)
  4. Perform immediate restart of UEFI PC
  5. Hopefully boot to my initial state of UEFI PC ("clean state") :)

Is this valid plan for UEFI PC? Or maybe I'm missing something especially when I ignore UEFI Partition in my backup plan?

Score:1
cl flag

The process differs by company. but the best practice is to backup settings, configurations, and critical data. Not the OS install itself. That can easily be reinstalled. You may even run into issues with UEFI secure boot and tpm keys that may change sometime between the backups your doing.

If your looking for drive failure protection, consider Raid 1.

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.