Before a kernel upgrade, a release upgrade or a big configuration change, take something you can go back to:
- Cloud or hypervisor snapshot of the disk (a boot-volume backup on a cloud provider, a snapshot in Proxmox). The easiest and the most complete.
- LVM snapshot if the root is on LVM:
sudo lvcreate -L 5G -s -n pre-upgrade /dev/vg0/root, and remove it afterwards withsudo lvremove vg0/pre-upgrade(a full snapshot slows the disk and fills up). - File-level:
sudo tar czf ~/etc-backup-$(date +%F).tar.gz /etcand a copy of the application data.
Write down how to roll back before you start, and test that the backup can be restored. A snapshot is not a backup: it usually lives on the same storage.