From fb380d31653784ebd05abf00f9f308bbf5dc8552 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 18 Sep 2019 07:40:59 -0400 Subject: [PATCH] Fixed missing --del in backup units --- backup-files-rsync.service | 3 ++- backup-roots-rsync@.service | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backup-files-rsync.service b/backup-files-rsync.service index 63f04fd..ca1a8d5 100644 --- a/backup-files-rsync.service +++ b/backup-files-rsync.service @@ -4,9 +4,10 @@ Description=Backup Files [Service] Environment=SOURCE=/path/to/source Environment=DESTINATION=user@host:/path/to/destination +Environment=OPTIONS="-HAax --del" Environment=EXCLUDES="--exclude path1 --exclude path2" Type=simple Nice=19 IOSchedulingClass=2 IOSchedulingPriority=7 -ExecStart=/bin/sh -c '/usr/bin/rsync -HAax ${EXCLUDES} "${SOURCE}/" "${DESTINATION}/"' +ExecStart=/bin/sh -c "/usr/bin/rsync ${OPTIONS} ${EXCLUDES} '${SOURCE}/' '${DESTINATION}/'" diff --git a/backup-roots-rsync@.service b/backup-roots-rsync@.service index ef4c497..3159ad7 100644 --- a/backup-roots-rsync@.service +++ b/backup-roots-rsync@.service @@ -6,4 +6,4 @@ Type=simple Nice=19 IOSchedulingClass=2 IOSchedulingPriority=7 -ExecStart=/bin/sh -c '/usr/bin/rsync -HAax // "%I/"' +ExecStart=/bin/sh -c '/usr/bin/rsync -HAax --del // "%I/"'