https://www.youtube.com/watch?v=_97JOyC1o2o


snapper
snap-pac
grub-btrfs

Note

These are mostly my notes to remind myself, I'd Highly reccomend watching this-video or reading this arch wiki page

/.snapshots already exists error

When I started running sudo snapper -c root create-config / I ran into the following error.

snapshots-already-exists


Creating config failed (creating btrfs subvolume .snapshots failed since it already exists).

remove existing snapshots


sudo umount /.snapshots
sudo rm -r /.snapshots

configure snapper


sudo snapper -c root create-config /
sudo snapper -c home create-config /home

btrfs subvolumes


sudo btrfs subvolume list /

btrfs-subvolume-list


sudo btrfs subvolume delete /.snapshots
sudo mkdir /.snapshots


# you might not see snapshots mounted yet
lsblk

# if you check fstab you will see an entry for it
cat /etc/fstab

# mount it
sudo mount -a

# now you should see /.snapshots mounted
lsblk

You should now see .snapshots in mountpoints.

lsblk-snapshots

Setting the default to @

so that you can boot into snapper snapshots


sudo btrfs subvol get-default /
sudo btrfs subvol list /

btrfs-subvol-get-default


sudo btrfs subvol set-default 256 /
sudo btrfs subvol get-default /
## ID 256 gen 105268 top level 5 path @

btrfs-subvol-set-default

snapper ls


sudo snapper ls

snapper-ls-init

leaving off for now

config


sudo nvim /etc/snapper/configs/root

ALLOW_GROUPS="wheel"

# limits for timeline cleanup
TIMELINE_MIN_AGE="1800"
TIMELINE_LIMIT_HOURLY="5"
TIMELINE_LIMIT_DAILY="7"
TIMELINE_LIMIT_WEEKLY="0"
TIMELINE_LIMIT_MONTHLY="0"
TIMELINE_LIMIT_YEARLY="0"

sudo chown -R :wheel /.snapshots/