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