From 53e7fcd1cbc1ca504bac4d9adfcff3246c48c8ae Mon Sep 17 00:00:00 2001 From: Alex Palaistras Date: Thu, 17 Feb 2022 21:53:09 +0000 Subject: [PATCH] rclone: Copy symbolic links verbatim Symbolic links are now synchronized verbatim (i.e. the links themselves, not their destinations) to allow for restoring our pattern of linking to the latest backup file. In addition, the destination remote and path can now be configured individually in drop-in files, but still default to the encrypted remote. --- service/rclone/rclone.env.template | 2 +- service/rclone/systemd/rclone-sync@.service | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/service/rclone/rclone.env.template b/service/rclone/rclone.env.template index ca4a460..954b5f2 100644 --- a/service/rclone/rclone.env.template +++ b/service/rclone/rclone.env.template @@ -1,6 +1,6 @@ # Common configuration. RCLONE_LOG_LEVEL=INFO -RCLONE_SKIP_LINKS=true +RCLONE_LINKS=true # Configuration for default encrypted remote, configured to wrap the default unencrypted remote. # Password and salt values must be processed via `rclone obscure` before setting. diff --git a/service/rclone/systemd/rclone-sync@.service b/service/rclone/systemd/rclone-sync@.service index 7b69e6d..cf19929 100644 --- a/service/rclone/systemd/rclone-sync@.service +++ b/service/rclone/systemd/rclone-sync@.service @@ -7,8 +7,10 @@ ConditionDirectoryNotEmpty=/%I [Service] Type=oneshot SyslogIdentifier=%N +Environment=DESTINATION=crypt:%i ExecStart=/bin/podman run --rm --env-file %E/coreos-home-server/rclone/rclone.env \ - --volume /%I:/data:z localhost/rclone:latest sync /data crypt:%i + --volume /%I:/data:z localhost/rclone:latest \ + sync /data ${DESTINATION} [Install] WantedBy=multi-user.target