I built some VMs to test out snapper and btrfs-assistant.
- EOS plasma kde
- archlinux arch way install following snapper subvol layout
- archinstall standard btrfs
- archinstall stardard btrfs but removing @.snapshot subvol and /.snapshot directory, and mount from fstab
In each case I install snapper snap-pac grub-btrfs btrfs-assistant the same way, except for #2 and #3. There I followed the snapper wiki and unmounted and removed /.snapshot.
I also removed the subvolid= from fstab for all arch installs and only use subvol=.
I used btrfs-assistant to setup the configs for root and home in all cases.
My test was to install the game aisleriot then use btrfs-assistant to restore to the pre snapshot taken before aisleriot was installed. Below is the output of btrfs su list / after that.
ID 256 gen 69 top level 5 path @_backup_20230812092527027
ID 257 gen 69 top level 5 path @home_backup_20230812092537868
ID 258 gen 73 top level 5 path @log
ID 259 gen 60 top level 5 path @pkg
ID 261 gen 10 top level 271 path var/lib/portables
ID 262 gen 10 top level 271 path var/lib/machines
ID 263 gen 64 top level 271 path .snapshots
ID 264 gen 64 top level 272 path @home/.snapshots
ID 265 gen 46 top level 263 path .snapshots/1/snapshot
ID 266 gen 47 top level 264 path @home/.snapshots/1/snapshot
ID 267 gen 65 top level 263 path .snapshots/2/snapshot
ID 268 gen 66 top level 264 path @home/.snapshots/2/snapshot
ID 269 gen 61 top level 263 path .snapshots/3/snapshot
ID 270 gen 63 top level 264 path @home/.snapshots/3/snapshot
ID 271 gen 73 top level 5 path @
ID 272 gen 73 top level 5 path @home
The original subvol ID for @ was 256 and @home was 257. They are now saved as backups.
The new @ is now subvol 271 and @home is 272.
This is consistent behavior in all my test cases.
Test case #4 duplicates the way EOS works to me. The snapshots are all in the hidden directory /.snapshots and there is no mounting of a @snapshots subvol at /.snapshots in the /etc/fstab.
Cases #2 and #3 both have the @snapshots or @.snapshots mounted via the fstab, but using btrfs-assistant makes the behavior the same as on EOS.
So what I get out of this testing is regardless of Archlinux the Arch way, archinstall, or EOS, if you use btrfs-assistant to manage snapshot restores the behavior is the same.
If my assumptions are correct, then I’m done because btrfs-assistant solves all of my problems and snapper from the console CLI can be confusing and generates results that I can’t recover from.
When I’m in a bind, I can boot a snapshot and once I determine that is the one to restore to I can run btrfs-assistant from that booted snapshot and do the restore of @ and @home to that snapshot number and then reboot. It always works for me.
Comments?