Sync both server snapshots with what the live machines run, and keep their backup tooling

This commit is contained in:
Gabriel Brown committed 2026-10-30 13:44:29 -04:00
1 parent 95fa480469
commit cb089b39ea
42 files changed
+3099 -21

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
[Unit]
Description=Weekly copy of the Media pool to the Backup pool
Documentation=file:///home/gib/Server/RESTORE.md
After=zfs-mount.service
Wants=zfs-mount.service
RequiresMountsFor=/home/gib/Public /home/gib/.local/share/Backup
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/media-backup
# 8.6 TB on the first run, deltas after. Generous, but bounded so a hung rsync
# fails loudly instead of overlapping next week's fire.
TimeoutStartSec=24h
Nice=10
IOSchedulingClass=best-effort
IOSchedulingPriority=7
[Install]
WantedBy=multi-user.target
+17
View File
@@ -0,0 +1,17 @@
[Unit]
Description=Weekly Media -> Backup pool copy
[Timer]
# Saturday 05:00. Clear of: the cron.daily zfs-auto-snapshot window (03:22-03:52),
# timeshift (04:00), arr-queue-reconcile (04:31), and both ~/Server backups (01:00, 02:00).
# Saturday specifically because Monday carries the Media scrub and Sunday has
# raid-check (01:00), docker-prune (05:33) and dind-prune (06:03).
# gib also runs Nextcloud's borg by hand roughly monthly and is, in his words,
# not going to be doing that at 5 AM on a Saturday -- so the borg lock should be free.
OnCalendar=Sat *-*-* 05:00:00
RandomizedDelaySec=15m
Persistent=true
Unit=media-backup.service
[Install]
WantedBy=timers.target
+19
View File
@@ -0,0 +1,19 @@
[Unit]
Description=Back up /home/gib/Server to the ZFS pool
Documentation=file:///home/gib/Server/RESTORE.md
# The destination is on ZFS; do not run before the pool is up.
After=zfs-mount.service docker.service
Wants=zfs-mount.service
RequiresMountsFor=/home/gib/Public
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/server-backup
TimeoutStartSec=8h
# This box is a daily driver running 145 containers. Stay out of the way.
Nice=10
IOSchedulingClass=best-effort
IOSchedulingPriority=7
[Install]
WantedBy=multi-user.target
+14
View File
@@ -0,0 +1,14 @@
[Unit]
Description=Daily backup of /home/gib/Server to the ZFS pool
[Timer]
# MUST finish before cron.daily fires zfs-auto-snapshot (~03:22-03:52); a snapshot that
# catches a running rsync stores a partial backup as that day's history.
# 02:00 also staggers against the VPS backup, which pushes into this same pool at 01:00.
OnCalendar=*-*-* 02:00:00
RandomizedDelaySec=10m
Persistent=true
Unit=server-backup.service
[Install]
WantedBy=timers.target