coreos-home-server/host/base/systemd/container-volume-backup@.service
Alex Palaistras dad3d1c12c Improve backups, introduce remote restore
Container volume backup logic has been moved to a (largely equivalent)
external script, allowing for future expansion of functionality. In
addition, a `rclone-pull@` service has been added and set up as a default
dependency for the `container-volume-restore@` service, allowing for
automatic set up of servers based on latest remote backups.
2022-07-17 19:38:10 +01:00

16 lines
611 B
Desktop File

[Unit]
Description=Backup for Container Volume %I
[Service]
Type=oneshot
SyslogIdentifier=%N
ExecStartPre=/bin/install --mode 0700 --directory %S/backups/coreos-home-server/%i
ExecStart=/bin/podman run --replace --rm --name %p-%i --entrypoint /opt/container-volume-backup \
--volume %i:/data:z,ro \
--volume %E/coreos-home-server/base/service:/opt:z,ro \
--volume %S/backups/coreos-home-server/%i:/backup:z \
docker.io/debian:bullseye-slim -s /data -d /backup -n "%i"
[Install]
WantedBy=multi-user.target