meta data for this page

Snapshots

snapper

apt-get install snapper snapper-gui

Create snapper configuration for subvolumes (specified by mount point):

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

The default settings will keep 10 hourly, 10 daily, 10 monthly and 10 yearly snapshot. Snapper automatically installs systemd's timers to work on periodic intervals.

To modify intervals and other per subvolume settings, inspect files in /etc/snapper/configs

Also automatic snapshot is performed when apt install sth:

## Path: System/Snapper
 
## Type:        string
## Default:     ""
# List of snapper configurations.
SNAPPER_CONFIGS="root home opt"
 
# if you want to disable snapshot per install/upgrade, then set "yes"
DISABLE_APT_SNAPSHOT="no"

Tuning

PRUNENAMES = ".snapshots"

issues

parser error : Document is empty

org.opensuse.Snapper[2126170]: :1: parser error : Document is empty
org.opensuse.Snapper[2126170]: ^

Reason: some info.xml files are empty or corrupted Solution: locate empty info.xml files

find . -name "info.xml" -type f -empty
 
# and remove snapshots manually:
btrfs sub delete 23/snapshot
rm 23/info.xml

system lags

snapper-cleanup.timer runs every 24h from system boot. It cause lots of lagging on GUI, mainly due to very slow writes to /tmp.

Workaround:

systemctl edit snapper-cleanup.timer
 
[Timer]
OnUnitActiveSec=
OnCalendar=*-*-* 02:11:00

From: https://wiki.archlinux.org/title/Btrfs#Quota_groups_(qgroups)

While Btrfs qgroups are considered stable for general use, enabling qgroups, especially in environments with frequent creation of large numbers of snapshots, can still lead to performance degradation, particularly during snapshot deletion. Qgroup accounting introduces additional metadata overhead and may affect system responsiveness under high-intensity snapshot workloads.