Add scheduled encrypted backup operations
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=GuestOps encrypted maintenance backup
|
||||
Requires=docker.service
|
||||
After=docker.service
|
||||
ConditionPathIsDirectory=/srv/guestops
|
||||
ConditionPathIsDirectory=/var/backups/guestops
|
||||
ConditionPathIsDirectory=/var/lib/guestops-backup/gnupg
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
WorkingDirectory=/srv/guestops
|
||||
EnvironmentFile=/etc/guestops/backup.env
|
||||
Environment=GNUPGHOME=/var/lib/guestops-backup/gnupg
|
||||
UMask=0077
|
||||
ExecStart=/usr/bin/python3 /srv/guestops/deploy/ops.py scheduled-backup --confirm-maintenance
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectHome=true
|
||||
ProtectSystem=full
|
||||
ReadWritePaths=/var/backups/guestops /var/lib/guestops-backup/gnupg
|
||||
TimeoutStartSec=45min
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Run the GuestOps encrypted backup each day
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 02:17:00 UTC
|
||||
RandomizedDelaySec=30min
|
||||
Persistent=true
|
||||
Unit=guestops-backup.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user