Files
clawstor/deploy/systemd/clawstor-snapshot-rotate.service
T
Omar Sobh 7a3c04bed7
Build with clawstor cache / Cargo build (clawstor-cached) (pull_request) Successful in 10s
Polish: daily snapshot rotation script + systemd timer
deploy/scripts/rotate-snapshots.sh creates daily-YYYY-MM-DD
snapshot + prunes daily-* older than RETAIN_DAYS. Only touches
its own daily-* namespace so hand-created snapshots (release
anchors etc) never get reaped.

02:00 timer runs ahead of the 03:15 ref-sweep + 03:30 gc so
tonight's fresh snapshot pins protect its blobs from eviction.

DRY_RUN=1 for preview.
2026-07-14 13:12:15 -07:00

15 lines
360 B
Desktop File

[Unit]
Description=Clawstor daily snapshot rotation (create today + prune > N days)
Documentation=https://git.redclaw.dev/clawverse/clawstor
After=clawstor-cluster.service
[Service]
Type=oneshot
Environment=RETAIN_DAYS=30
ExecStart=%h/clawstor-deploy/scripts/rotate-snapshots.sh
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=default.target