This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
BACKUP_DIRECTORY=/var/backups/guestops
|
||||
BACKUP_REMOTE_HOST=restricted-store.example.invalid
|
||||
BACKUP_REMOTE_USER=guestops_upload
|
||||
BACKUP_REMOTE_DIRECTORY=/restricted/guestops/backups
|
||||
BACKUP_SSH_IDENTITY=/etc/guestops/backup-transfer.key
|
||||
BACKUP_SSH_KNOWN_HOSTS=/etc/guestops/backup-known-hosts
|
||||
@@ -0,0 +1,2 @@
|
||||
BACKUP_RECIPIENT=0123456789ABCDEF0123456789ABCDEF01234567
|
||||
BACKUP_DIRECTORY=/var/backups/guestops
|
||||
@@ -0,0 +1,19 @@
|
||||
[Unit]
|
||||
Description=Transfer GuestOps encrypted backups to restricted storage
|
||||
Wants=network-online.target
|
||||
After=network-online.target guestops-backup.service
|
||||
ConditionPathIsDirectory=/srv/guestops
|
||||
ConditionPathIsDirectory=/var/backups/guestops
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
WorkingDirectory=/srv/guestops
|
||||
EnvironmentFile=/etc/guestops/backup-transfer.env
|
||||
UMask=0077
|
||||
ExecStart=/usr/bin/python3 /srv/guestops/deploy/backup_transfer.py --prune-verified --retention-days 7
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectHome=true
|
||||
ProtectSystem=full
|
||||
ReadWritePaths=/var/backups/guestops
|
||||
TimeoutStartSec=30min
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Retry GuestOps off-host backup transfer
|
||||
|
||||
[Timer]
|
||||
OnBootSec=10min
|
||||
OnUnitActiveSec=15min
|
||||
Persistent=true
|
||||
Unit=guestops-backup-transfer.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=Write non-sensitive GuestOps monitoring status
|
||||
Requires=docker.service
|
||||
After=docker.service network-online.target
|
||||
ConditionPathIsDirectory=/srv/guestops
|
||||
ConditionPathIsDirectory=/var/backups/guestops
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
WorkingDirectory=/srv/guestops
|
||||
UMask=0022
|
||||
ExecStart=/usr/bin/python3 /srv/guestops/deploy/monitor_status.py
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectHome=true
|
||||
ProtectSystem=strict
|
||||
RuntimeDirectory=guestops-monitor
|
||||
RuntimeDirectoryMode=0755
|
||||
RuntimeDirectoryPreserve=yes
|
||||
ReadWritePaths=/run/guestops-monitor
|
||||
TimeoutStartSec=2min
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Refresh GuestOps monitoring status each minute
|
||||
|
||||
[Timer]
|
||||
OnBootSec=2min
|
||||
OnUnitActiveSec=1min
|
||||
Persistent=true
|
||||
Unit=guestops-monitor-status.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,2 @@
|
||||
# The privileged systemd probe owns Docker/database access. Zabbix reads only this aggregate JSON.
|
||||
UserParameter=guestops.status,cat /run/guestops-monitor/status.json
|
||||
Reference in New Issue
Block a user