Setting up snapper on Arch ━━━━━━━━━━━━━━━━━━━━━━━━━━ https://www.youtube.com/watch?v=_97JOyC1o2o Date: September 5, 2022 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. Image: snapshots-already-exists.webp ``` 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 / ``` Image: btrfs-subvolume-list.webp ``` 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. Image: lsblk-snapshots.webp Setting the default to @ ──────────────────────── so that you can boot into snapper snapshots ``` sudo btrfs subvol get-default / sudo btrfs subvol list / ``` Image: btrfs-subvol-get-default.webp ``` sudo btrfs subvol set-default 256 / sudo btrfs subvol get-default / ## ID 256 gen 105268 top level 5 path @ ``` Image: btrfs-subvol-set-default.webp snapper ls ────────── ``` sudo snapper ls ``` Image: snapper-ls-init.webp leaving off for now https://youtu.be/_97JOyC1o2o?t=909 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/ ```