mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-08 11:16:47 +00:00
The daily backups stayed on the panel's host, so losing the host lost them too. webvirt-offsite.timer now copies them at 03:45 with restic over SFTP to another server, encrypted with a password only the administrator and the host hold, and keeps 7 daily, 4 weekly and 6 monthly copies. It runs on the host as root, with Docker too, outside the panel and its image. It fails when the newest backup is older than 26 hours, so a stopped panel backup shows; an optional heartbeat URL is called after each good copy. The README has the setup, how to get a backup back from the copies, and a fix found by the drill: moving to a new machine stopped when the backup had no SSH keys (a panel without SSH computes).
10 lines
191 B
SYSTEMD
10 lines
191 B
SYSTEMD
[Unit]
|
|
Description=Daily off-site copy of the WebVirtCloud panel backups
|
|
|
|
[Timer]
|
|
# after the panel's backup at 03:15
|
|
OnCalendar=*-*-* 03:45
|
|
Persistent=true
|
|
|
|
[Install]
|
|
WantedBy=timers.target
|