Make Nextcloud NAS backups independent, verified and retryable
This commit is contained in:
1 parent
ffe3c354be
commit
7e94915442
15 files changed
+889
-504
No files matched your search
@@ -1,13 +1,20 @@
|
||||
[Unit]
|
||||
Description=Back up mounted Nextcloud folder to Synology with Borg
|
||||
Description=Verified Nextcloud backup to NAS (independent of desktop mount)
|
||||
Documentation=man:borg(1)
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=%h/.local/bin/nextcloud-borg-backup backup
|
||||
ExecStart=%h/.local/bin/nextcloud-borg-backup backup --if-due
|
||||
TimeoutStartSec=12h
|
||||
TimeoutStopSec=30s
|
||||
KillMode=control-group
|
||||
Nice=10
|
||||
IOSchedulingClass=best-effort
|
||||
IOSchedulingPriority=6
|
||||
UMask=0077
|
||||
NoNewPrivileges=true
|
||||
Environment=LANG=C.UTF-8
|
||||
Environment=LC_ALL=C.UTF-8
|
||||
Environment=BORG_LOCK_WAIT=60
|
||||
Environment=BORG_NON_INTERACTIVE=1
|
||||
@@ -1,10 +1,12 @@
|
||||
[Unit]
|
||||
Description=Daily Nextcloud Borg backup timer
|
||||
Description=Check every 15 minutes for due or failed Nextcloud NAS backup
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 03:15:00
|
||||
OnStartupSec=2min
|
||||
OnCalendar=*:0/15
|
||||
Persistent=true
|
||||
RandomizedDelaySec=30m
|
||||
RandomizedDelaySec=60s
|
||||
AccuracySec=30s
|
||||
Unit=nextcloud-borg-backup.service
|
||||
|
||||
[Install]
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Warn if verified Nextcloud NAS backup is overdue
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=%h/.local/bin/nextcloud-borg-backup health --notify
|
||||
TimeoutStartSec=45s
|
||||
UMask=0077
|
||||
NoNewPrivileges=true
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Hourly Nextcloud backup age watchdog
|
||||
|
||||
[Timer]
|
||||
OnStartupSec=5min
|
||||
OnCalendar=hourly
|
||||
Persistent=true
|
||||
RandomizedDelaySec=2min
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in new issue
Block a user