Skip to content

Commit

Permalink
sync only the target filesystem at the end of mover tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
evandeaubl committed Nov 23, 2024
1 parent 6822ac2 commit 75d5df0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mover-rclone/active.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion mover-rsync-tls/server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -213,5 +213,5 @@ fi
wait
echo "Stunnel completed shut down."

sync
sync -f $TARGET
echo "Sync complete, exiting."
2 changes: 1 addition & 1 deletion mover-rsync/destination.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion mover-rsync/source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 75d5df0

Please sign in to comment.