EOS with custom btrfs/snapper setup

Yep, those two.

OK, I haven’t tested this precisely, but I think the instructions would be something like this:

  • yay -Syu snapper inotify-tools snap-pac grub-btrfs btrfs-assistant btrfsmaintenance (You don’t need the last two but they are convenient. I am going to use Btrfs Assistant in the instructions but it can all be done via the CLI as well)
  • In Btrfs Assistant, on the “Snapper Settings” tab:
    • Uncheck “Snapper timeline enabled” so you won’t get hourly snapshots
    • Check “Snapper cleanup enabled” to automatically delete older snapshots based on your retention rules
    • Click “New”, select / in the box and use the name “root” for the config
    • Set the settings to your preference although since we disabled the timeline timer, the only one that matters is the “Numbers” setting. This is the number of snapshots from pacman operations that will be retained. Keep in mind that it takes two snapshots for each so if you set this to 10 you will get 5 pacman operations.
  • After saving the changes, go to the snapper tab and take a manual snapshot to ensure that it works and for testing.
  • Run sudo systemctl enable --now grub-btrfsd
  • Run sudo grub-mkconfig -o /boot/grub/grub.cfg
  • Install or remove a package using yay or pacman
  • Reboot and see if the snapshots are in your grub menu. You should see 3 snapshots. The manual one and the two from the pacman operation.
  • Go back into Btrfs Assistant and delete the manual snapshot we created earlier.
1 Like