You are not logged in.
Hello,
I'm testing snapper on Arch Linux but it seems that the Number Cleanup is not working. Only the Timeline Cleanup seems to work correctly. I'm using it with BTRFS Assistant application and snap-pac.
In /etc/snapper/configs/root the configuration file is the following:
# subvolume to snapshot
SUBVOLUME="/"
# filesystem type
FSTYPE="btrfs"
# btrfs qgroup for space aware cleanup algorithms
QGROUP=""
# fraction or absolute size of the filesystems space the snapshots may use
SPACE_LIMIT="0.5"
# fraction or absolute size of the filesystems space that should be free
FREE_LIMIT="0.2"
# users and groups allowed to work with config
ALLOW_USERS=""
ALLOW_GROUPS=""
# sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots
# directory
SYNC_ACL="no"
# start comparing pre- and post-snapshot in background after creating
# post-snapshot
BACKGROUND_COMPARISON="yes"
# run daily number cleanup
NUMBER_CLEANUP="yes"
# limit for number cleanup
NUMBER_MIN_AGE="1800"
NUMBER_LIMIT="10"
NUMBER_LIMIT_IMPORTANT="5"
# create hourly snapshots
TIMELINE_CREATE="no"
# cleanup hourly snapshots after some time
TIMELINE_CLEANUP="yes"
# 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"
# cleanup empty pre-post-pairs
EMPTY_PRE_POST_CLEANUP="yes"
# limits for empty pre-post-pair cleanup
EMPTY_PRE_POST_MIN_AGE="1800"So I expect that the number limit of the stored snapshots should be 10. Instead, it seems to overcome this threshold. If I run sudo snapper -v cleanup number I don't get any output.
About the services, snapperd.service is active with no issues. snapper-cleanup.service is inactive and /usr/lib/systemd/system/snapper-cleanup.service has the following content:
[Unit]
Description=Daily Cleanup of Snapper Snapshots
Documentation=man:snapper(8) man:snapper-configs(5)
[Service]
Type=simple
ExecStart=/usr/lib/snapper/systemd-helper --cleanup
IOSchedulingClass=idle
CPUSchedulingPolicy=idle
CapabilityBoundingSet=CAP_DAC_OVERRIDE CAP_FOWNER CAP_CHOWN CAP_FSETID CAP_SETFCAP CAP_SYS_ADMIN CAP_SYS_MODULE CAP_IPC_L>
LockPersonality=true
NoNewPrivileges=false
PrivateNetwork=true
ProtectHostname=true
RestrictAddressFamilies=AF_UNIX
RestrictRealtime=trueIf I execute sudo systemctl restart snapper-cleanup.service nothing happens. Its status says:
snapper-cleanup.service - Daily Cleanup of Snapper Snapshots
Loaded: loaded (/usr/lib/systemd/system/snapper-cleanup.service; static)
Active: inactive (dead)
Docs: man:snapper(8)
man:snapper-configs(5)
Nov 13 19:16:38 athena-vmwarevirtualplatform systemd[1]: Started Daily Cleanup of Snapper Snapshots.
Nov 13 19:16:38 athena-vmwarevirtualplatform systemd-helper[80595]: running cleanup for 'root'.
Nov 13 19:16:38 athena-vmwarevirtualplatform systemd-helper[80595]: running number cleanup for 'root'.
Nov 13 19:16:38 athena-vmwarevirtualplatform systemd-helper[80595]: running timeline cleanup for 'root'.
Nov 13 19:16:38 athena-vmwarevirtualplatform systemd-helper[80595]: running empty-pre-post cleanup for 'root'.
Nov 13 19:16:39 athena-vmwarevirtualplatform systemd[1]: snapper-cleanup.service: Deactivated successfully.but if I check in BTRFS Assistant in Snapper tab, I see a lot of snapshots, more than the NUMBER_LIMIT=10. It is like snapper is ignoring /etc/snapper/configs/root file despite it seems to be reflected well in BTRFS Assistant snapper settings.
I'm not sure if snapper-cleanup.service is the right service because maybe it is related to the timeline cleanup only.
I also rebooted with no luck. How is it possible to enforce this number limit in order that it does not create further snapshots over the specified NUMBER_LIMIT?
Offline