Setting up snapper on Arch ━━━━━━━━━━━━━━━━━━━━━━━━━━ https://www.youtube.com/watch?v=_97JOyC1o2o Date: September 5, 2022 https://www.youtube.com/watch?v=_97JOyC1o2o [code] snapper snap-pac grub-btrfs Note ──── These are mostly my notes to remind myself, I’d Highly reccomend watching this-video <https://www.youtube.com/watch?v=_97JOyC1o2o> or reading this arch wiki page <https://wiki.archlinux.org/title/snapper> /.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 [code] Creating config failed (creating btrfs subvolume .snapshots failed since it already exists). remove existing snapshots ───────────────────────── [code] sudo umount /.snapshots sudo rm -r /.snapshots configure snapper ───────────────── [code] sudo snapper -c root create-config / sudo snapper -c home create-config /home btrfs subvolumes ──────────────── [code] sudo btrfs subvolume list / Image: btrfs-subvolume-list.webp [code] sudo btrfs subvolume delete /.snapshots sudo mkdir /.snapshots [code] # 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 [code] sudo btrfs subvol get-default / sudo btrfs subvol list / Image: btrfs-subvol-get-default.webp [code] 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 ────────── [code] sudo snapper ls Image: snapper-ls-init.webp leaving off for now https://youtu.be/_97JOyC1o2o?t=909 config ────── [code] sudo nvim /etc/snapper/configs/root [code] 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" [code] sudo chown -R :wheel /.snapshots/