Skip to main content

Omarchy snapshots on BTRFS

·772 words·4 mins

Omarchy snapshots on BTRFS #

Coming from Linux mint, I appreciated the safety that I felt with BTRFS and snapshots. I have installed timeshift, but that doesn’t appear to the be arch blessed way of managing snapshots so this is my attempt at documenting my setup.

Snapper appears to be the soup du jour and there’s a lengthy configuration guide here: https://wiki.archlinux.org/title/Snapper.

Basics #

  • configuration appears to be in /etc/snapper/configs
  • when configured, snapshots appear to be stored here /.snapshots
  • cron isn’t installed by default, Arch appears to use systemd/Timers instead (https://wiki.archlinux.org/title/Cron)
  • systemctl status snapper-timeline.timer shows the status of the scheduler
  • systemctl status snapper-cleanup.timer shows the cleaner for snapper

Configuration #

My schedule to keep snapshots is this

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# /etc/snapper/configs/home
# Use no more than 10% of the total drive size
SPACE_LIMIT="0.1"

TIMELINE_MIN_AGE="1800" #num of seconds before it can be deleted
TIMELINE_LIMIT_HOURLY="8"
TIMELINE_LIMIT_DAILY="7"
TIMELINE_LIMIT_WEEKLY="4"
TIMELINE_LIMIT_MONTHLY="0"
TIMELINE_LIMIT_YEARLY="0"

# /etc/snapper/configs/root
SPACE_LIMIT="0.1"
TIMELINE_CREATE="yes"
TIMELINE_CLEANUP="yes"
TIMELINE_MIN_AGE="1800"
TIMELINE_LIMIT_HOURLY="1"
TIMELINE_LIMIT_DAILY="7"
TIMELINE_LIMIT_WEEKLY="4"
TIMELINE_LIMIT_MONTHLY="0"
TIMELINE_LIMIT_YEARLY="0"

The scheduler to run snapper is

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#
systemctl status snapper-timeline.timer
# /usr/lib/systemd/system/snapper-timeline.timer
[Unit]
Description=Timeline of Snapper Snapshots
Documentation=man:snapper(8) man:snapper-configs(5)
[Timer]
OnCalendar=hourly
[Install]
WantedBy=timers.target

Restart the services:

1
2
sudo systemctl restart snapper-timeline.timer
sudo systemctl start snapper-timeline.service

Update updatedb not to index the snapshots files

1
2
#/etc/updatedb.conf
PRUNENAMES = ".snapshots"

The schedule can be seen through:

1
2
3
systemctl list-timers snapper-timeline.timer
NEXT                          LEFT LAST                            PASSED UNIT                   ACTIVATES
Sat 2025-10-11 09:00:00 AEDT 23min Sat 2025-10-11 08:00:00 AEDT 36min ago snapper-timeline.timer snapper-timeline.service

Management #

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# list the current snapshots for a configuration
# snapper list -a -t all --columns number,type,subvolume,date,description
Config: home, subvolume: /home
# │ Type   │ Subvolume │ Date                             │ Description
──┼────────┼───────────┼──────────────────────────────────┼──────────────────────────
0 │ single │ /home     │                                  │ current
1 │ single │ /home     │ Sun 28 Sep 2025 06:35:46 PM AEST │ v3.0.0
2 │ single │ /home     │ Tue 30 Sep 2025 07:47:59 PM AEST │ v3.0.1
3 │ single │ /home     │ Fri 03 Oct 2025 05:43:25 PM AEST │ v3.0.2
4 │ single │ /home     │ Tue 07 Oct 2025 04:34:10 PM AEDT │ v3.0.2
5 │ single │ /home     │ Fri 10 Oct 2025 05:40:43 PM AEDT │ backup the home partition

Config: root, subvolume: /
# │ Type   │ Subvolume │ Date                             │ Description
──┼────────┼───────────┼──────────────────────────────────┼────────────
0 │ single │ /         │                                  │ current
1 │ single │ /         │ Sun 28 Sep 2025 06:35:46 PM AEST │ v3.0.0
2 │ single │ /         │ Tue 30 Sep 2025 07:47:59 PM AEST │ v3.0.1
3 │ single │ /         │ Fri 03 Oct 2025 05:43:25 PM AEST │ v3.0.2
4 │ single │ /         │ Tue 07 Oct 2025 04:34:10 PM AEDT │ v3.0.2
5 │ single │ /         │ Fri 10 Oct 2025 05:34:47 PM AEDT │ boot

# manually take a snapshot of the root partition
systemctl start snapper-boot.service

# manually take a snapshot of a configuration (home)
snapper -c home create --description "backup the home partition"

If you want to run a GUI manager, you can pkexec env WAYLAND_DISPLAY="$WAYLAND_DISPLAY" XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" snapper-gui

I can’t see the size of the snapshots, as the default Omarchy setup sets btrfs to quota disabled. There may be a performance penalty for this so I will update if I enable.

1
2
btrfs qgroup show /
ERROR: can't list qgroups: quotas not enabled

Delete snapshots #

1
2
3
4
# View the snapshots
snapper -c root list
# Delete a single snapshot
snapper -c root delete <snapshot_id>

Manual snapshots #

Mark a snapshot as important so that it doesn’t get purged by the number purging

1
sudo snapper -c root create --description "manual update" --important

Wasted space #

https://wiki.archlinux.org/title/Snapper#Orphaned_snapshots_causing_wasted_disk_space

Orphaned snapshots causing wasted disk space It is possible for snapshots to get ’lost’, where they still exist on disk but are not tracked by snapper. This can result in a large amount of wasted, unaccounted-for disk space. To check for this, compare the output of # snapper -c <config> list to # btrfs subvolume list -o <parent subvolume>/.snapshots Any subvolume in the second list which is not present in the first is an orphan and can be deleted manually.

Bonus: limine-snapper-sync #

https://gitlab.com/Zesko/limine-snapper-sync

Omarchy ships with limine-snapper-sync which allows for the addition of root snapshots into the limine boot menu. This boot menu is found here /boot/limine.conf but the configuration is a timer service.

1
systemctl status limine-snapper-sync.service