From 75d5df0f97a08be934c328ce53c6066bc9ad1fc2 Mon Sep 17 00:00:00 2001 From: Evan Deaubl Date: Sat, 23 Nov 2024 07:38:48 -0700 Subject: [PATCH] sync only the target filesystem at the end of mover tasks --- mover-rclone/active.sh | 2 +- mover-rsync-tls/server.sh | 2 +- mover-rsync/destination.sh | 2 +- mover-rsync/source.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mover-rclone/active.sh b/mover-rclone/active.sh index 4ada1dbe9..b2e5293a8 100755 --- a/mover-rclone/active.sh +++ b/mover-rclone/active.sh @@ -87,5 +87,5 @@ destination) error 1 "unknown value for DIRECTION: ${DIRECTION}" ;; esac -sync +sync -f ${RCLONE_DEST_PATH} echo "Rclone completed in $(( SECONDS - START_TIME ))s" diff --git a/mover-rsync-tls/server.sh b/mover-rsync-tls/server.sh index 23e00c1df..95fa2d380 100644 --- a/mover-rsync-tls/server.sh +++ b/mover-rsync-tls/server.sh @@ -213,5 +213,5 @@ fi wait echo "Stunnel completed shut down." -sync +sync -f $TARGET echo "Sync complete, exiting." diff --git a/mover-rsync/destination.sh b/mover-rsync/destination.sh index 85187cb8f..ff0b417ed 100755 --- a/mover-rsync/destination.sh +++ b/mover-rsync/destination.sh @@ -68,6 +68,6 @@ if [[ -e /tmp/exit_code ]]; then CODE="$CODE_IN" fi fi -sync +sync -f $HOME echo "Exiting... Exit code: $CODE" exit "$CODE" diff --git a/mover-rsync/source.sh b/mover-rsync/source.sh index 5a1801f86..0e42bff80 100755 --- a/mover-rsync/source.sh +++ b/mover-rsync/source.sh @@ -137,7 +137,7 @@ do done set -e echo "Rsync completed in $(( SECONDS - START_TIME ))s" -sync +sync -f $SOURCE if [[ $rc -eq 0 ]]; then echo "Synchronization completed successfully. Notifying destination..." # ssh does not take [ip] format for ipv6, so use DESTINATION_ADDRESS rather than URL_DESTINATION_ADDRESS