Stagger and limit timelapse sync transfers
This commit is contained in:
+5
-1
@@ -8,7 +8,11 @@ main() {
|
|||||||
local name
|
local name
|
||||||
name="$(basename "${filepath}")"
|
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}" \
|
"${HOME}/timelapse/${name}" \
|
||||||
"${RSYNC_USER}@${RSYNC_SERVER}:/timelapse/${name}"
|
"${RSYNC_USER}@${RSYNC_SERVER}:/timelapse/${name}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user