coreos-home-server/service/rclone/systemd/rclone-sync@.service
Alex Palaistras 9dad5ad2c4 rclone: Add systemd service for transparent backup
This commit adds a new systemd service, `rclone-sync@.service`,
templated against the absolute path of a directory to keep in sync with
a (presumably) remote store.

Support for Backblaze B2 endpoints has been set up by default, but the
specific remote type can be configured via the `RCLONE_REMOTE_TYPE` host
variable. In addition, a default-passthrough remote that encrypts data
against a static password and salt has been defined under the `crypt`
name, and can also be used as the `RCLONE_DEST` of choice.
2022-02-06 20:39:14 +00:00

16 lines
463 B
Desktop File

[Unit]
Description=Rclone Sync for /%I
Wants=container-build@rclone.service
After=container-build@rclone.service
ConditionDirectoryNotEmpty=/%I
[Service]
Type=oneshot
SyslogIdentifier=%N
EnvironmentFile=%E/coreos-home-server/rclone/rclone.env
ExecStart=/bin/podman run --rm --env-file %E/coreos-home-server/rclone/rclone.env \
--volume /%I:/data:z localhost/rclone:latest sync /data ${RCLONE_DEST}
[Install]
WantedBy=multi-user.target