For disaster recovery (worst case scenario: all disks were on fire) I want to have a “functional” backup of the underlaying system as a first step for further recovery actions. The machine is remote, hence installing the system is most difficult. In addition I do a file based backup at least once a day.
- The disk layout (it is mirrored btrfs), all volumes and subvolumes
- All the boot logic like uefi keys (tpm?) and grub2
- The currently running kernel with modules and config
- A list of installed packages (including their repos)
(Did I forget anything?)
Ideally the recovery script is simply bash.
The idea: With new hardware I boot into a rescue console, mount backup storage and run a recovery script from there. It will install a basic Leap 16 from scratch, using the same disk layout, make it bootable and download/install all packages as before. Basically a reinstall of the running system without configs.
It is not meant to have alle the packages and stuff in the backup itself, it will pull from openSUSE network.
In disaster case first manual action would be overwriting the whole /etc (backup: config). Next /usr/local (backup: tools), /home (backup: users), /srv (backup: production) and than the last snapshots of the databases.