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:
- Unmount /boot parition
- Execute reversed dd of boot parition backup (so after this we have original kernels in boot parition, /boot remains unmounted at this moment)
- Restore lv-root from lv-root-snap (it will be scheduled for next restart as this is mounted active root partition)
- Perform immediate restart of UEFI PC
- 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?