

2·
2 months agoI’m lucky to have only had one system nuked by a faulty power supply that shut down during a kernel update.
I usually just reinstalled back then. But I didn’t get into it till the late nineties. Back when Ian was still on the list serves.
Unless you mean nuking the OS or borking the bootloader. Then yeah, countless.
Build the snapshot with the below file
To restore subvolume from backup we run the process in reverse:
# read backup file and decompress the stream, redirect to temporary read-only snapshot dd if=/path-to-external-backup/subvol.zstd.back | \ pv -c | pzstd -d | pv -c | \ btrfs receive /path-to-sv/ # make a RW subvolume btrfs subvolume snapshot subvol.ro subvol # delete temporary snapshot btrfs subvolume delete /path-to-sv/subvol.ro
From here
https://superuser.com/questions/1396241/btrfs-imaging-a-volume-to-an-external-file
You might want to make this into a systemd timer to run at boot or before shutting down
https://linuxconfig.org/how-to-schedule-tasks-with-systemd-timers-in-linux