diff --git a/scripts/sync b/scripts/sync index 52f58ec..e4a766e 100755 --- a/scripts/sync +++ b/scripts/sync @@ -8,7 +8,11 @@ main() { local name name="$(basename "${filepath}")" - rsync --archive --verbose \ + # Stagger transfers to avoid congestion at the hour mark. + sleep $((RANDOM % 180)) + + # Limit bandwidth so the backup does not saturate the connection. + rsync --archive --verbose --bwlimit=4096 \ "${HOME}/timelapse/${name}" \ "${RSYNC_USER}@${RSYNC_SERVER}:/timelapse/${name}"