Files
Clément Désiles ceca06ff2e feat(backup): add restic backup role with encrypted incremental snapshots
Restic-backed backups using a many-to-many repository/job model.

- repository = destination: restic repository URL verbatim (s3, local,
  removable device), backend credentials via env passthrough, retention
  policy, and an optional per-repository ntfy notify channel
- job = source set: paths, sqlite and postgres dumps (consistent .backup /
  pg_dump instead of torn live-file copies), pushed to one or more repos
- systemd timer per job, per-repo + per-job flock serialisation, restic
  check with read_data_subset for rotating integrity verification

Service roles declare what to back up (ntfy_backup_*, uptime_kuma_backup_*);
the inventory declares where.
2026-09-01 22:20:27 +02:00

14 lines
341 B
Django/Jinja

[Unit]
Description=Backup timer for job %i
[Timer]
OnCalendar={{ backup_schedule }}
RandomizedDelaySec={{ backup_randomized_delay }}
# Run on next boot if the machine was off when the timer was due. Without this
# a box that is down every Sunday would never back up.
Persistent=true
Unit=backup@%i.service
[Install]
WantedBy=timers.target