Skip to content

Commit 6281eb9

Browse files
add extra sync args
1 parent e369048 commit 6281eb9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

mirror-s3.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ encrypt_and_sync() {
8383
# Upload encrypted files to destination
8484
echo "=> Uploading encrypted files to destination..."
8585
if [ -n "$compare_dest" ]; then
86-
rclone --progress $BW_LIMIT --config=/etc/rclone.conf sync "$encrypted_dir" "$destination" --compare-dest="$compare_dest"
86+
rclone --progress $BW_LIMIT --config=/etc/rclone.conf sync "$encrypted_dir" "$destination" --compare-dest="$compare_dest" ${EXTRA_SYNC_ARGS}
8787
else
88-
rclone --progress $BW_LIMIT --config=/etc/rclone.conf sync "$encrypted_dir" "$destination"
88+
rclone --progress $BW_LIMIT --config=/etc/rclone.conf sync "$encrypted_dir" "$destination" ${EXTRA_SYNC_ARGS}
8989
fi
9090

9191
# Clean up temporary files
@@ -120,7 +120,7 @@ if [ -n "$DO_ATOMIC" ]; then
120120
rclone --config=/etc/rclone.conf move sync_dst:${DESTINATION_TMP_BUCKET} sync_dst:${DESTINATION_BUCKET}
121121
else
122122
echo "=> Syncing from source..."
123-
rclone --progress $BW_LIMIT --config=/etc/rclone.conf sync sync_src:${SOURCE_BUCKET} sync_dst:${DESTINATION_TMP_BUCKET} --compare-dest=sync_dst:${DESTINATION_BUCKET}
123+
rclone --progress $BW_LIMIT --config=/etc/rclone.conf sync sync_src:${SOURCE_BUCKET} sync_dst:${DESTINATION_TMP_BUCKET} --compare-dest=sync_dst:${DESTINATION_BUCKET} ${EXTRA_SYNC_ARGS}
124124
echo "=> Moving..."
125125
rclone --config=/etc/rclone.conf move sync_dst:${DESTINATION_TMP_BUCKET} sync_dst:${DESTINATION_BUCKET}
126126
fi
@@ -129,7 +129,7 @@ else
129129
if [ "$GPG_ENABLED" = true ]; then
130130
encrypt_and_sync "sync_src:${SOURCE_BUCKET}" "sync_dst:${DESTINATION_BUCKET}"
131131
else
132-
rclone --progress $BW_LIMIT --config=/etc/rclone.conf sync sync_src:${SOURCE_BUCKET} sync_dst:${DESTINATION_BUCKET}
132+
rclone --progress $BW_LIMIT --config=/etc/rclone.conf sync sync_src:${SOURCE_BUCKET} sync_dst:${DESTINATION_BUCKET} ${EXTRA_SYNC_ARGS}
133133
fi
134134
fi
135135

0 commit comments

Comments
 (0)