Skip to content

BTRFS Snapshots (snapper)

Runs through process of setting system backs with BTRFS formated drive on fedora

sudo snapper -c root create-config /

sudo snapper -c home create-config /home

sudo snapper list-configs
Config │ Subvolume
───────┼──────────
home │ /home
root │ /

sudo dnf install python3-dnf-plugin-snapper

sudo snapper -c root list sudo snapper -c home list

sudo snapper -c root create --description "Before fedora 44 upgrade" sudo snapper -c home create --description "Before fedora 44 upgrade"

use list command to find <num> sudo snapper -c root delete <num> sudo snapper -c home delete <num>

The GUI application for managing snapshots on fedora.

sudo btrfs-assistant

  1. navigate to snapper
  2. select snapshot location (snapshot config)
  3. press “new” to manually create a snapshot

snapshots cost near zero intially and only gor in size as files are changed. If home is 60G and 500MB worth of changes happen the snapshot only uses 500MB. You may want to exclude directories that do not change often

mv ~/.cache ~/.cache-old
btrfs subvolume create ~/.cache
cp -a ~/.cache-old/. ~/.cache/
rm -rf ~/.cache-old
rm -rf ~/.local/share/Trash
btrfs subvolume create ~/.local/share/Trash
mv ~/Downloads ~/Downloads-old
btrfs subvolume create ~/Downloads
cp -a ~/Downloads-old/. ~/Downloads
rm -rf ~/Downloads-old
killall -9 steam
mv ~/.local/share/Steam ~/.local/share/Steam-old
btrfs subvolume create ~/.local/share/Steam
cp -a ~/.local/share/Steam-old/. ~/.local/share/Steam/
rm -rf ~/.local/share/Steam-old
mv ~/.local/share/flatpak ~/.local/share/flatpak-old
btrfs subvolume create ~/.local/share/flatpak
cp -a ~/.local/share/flatpak-old/. ~/.local/share/flatpak/
rm -rf ~/.local/share/flatpak-old