I’ve seen some tools that do things like take snapshots periodically and ones that add snapshots to grub, but not this specifically. Does something exist?
This will probably be on EndeavourOS, not Arch directly, if it matters.
The AUR package
btrfs-autosnap
does this. You define which subvolumes need to be snapshotted and how many it should keep of each. It adds a pacman hook that then takes a snapshot before updating.manjaro does this with timeshift. i think opensuse does as well.
You can run scripts before/after pacman commands using hooks
alias upgrayedd='<snapshot command> && pacman/paru ...'
OR
upgrayedd() { <pre> <snapshot cmd> pacman/paru "$1" <post> }
This is what I use, I am on endeavouros too.
I don’t know the details, but CachyOS uses a pacman hook to do exactly that, so it’s possible. It looks like there are AUR packages to do the same thing, but I haven’t looked at them
Does it do this out of the box? CachyOS is another option on my radar and that might push it over the edge for me over EOS.
Yep, as long as you use btrfs during the install and select snapper support
Just installed CachyOS and chose btrfs when installing, but it never asked about snapper. Maybe I need to do it manually.
If you open cachy hello, you’ll see an option to install snapper support there. I should also add, you need to use grub for the boot images to work when you do a kernel upgrade
Awesome! I installed it. Hopefully if something goes wrong I should be good. And yes, I used Grub!