Rsync Balancing

Thom Paine painethom at gmail.com
Tue Jan 24 22:41:53 UTC 2006


> > --bwlimit=KBPS          limit I/O bandwidth; KBytes per second
> >
>

Here's a copy of my rsync file I use to transfer files around. I set
it to 45k/s so I still have half my pipe for other things like email
and stuff.

#!/bin/bash
#Rsync Backup Script

RSYNC=/usr/bin/rsync
SSH=/usr/bin/ssh
RHOST=123.456.789.10
RPATH=/home/workgroup/rsync/somewhere/officewrk
LPATH=/home/workgroup/officewrk/
MAXSPEED=45
NOTES=/root/rsync.officewrk.text

#Delete old notes.
rm -f $NOTES

echo `date` > $NOTES

$RSYNC -azrv --delete --bwlimit=$MAXSPEED -e $SSH $LPATH $RHOST:$RPATH >> $NOTES

echo `date` >> $NOTES

mail -s "Sync Report --officewrk" user at host.ca < $NOTES

rm -f $NOTES



Then I can just adjust it if I want full speed. Putting it to 120
maxes out my connection if I need a fast transfer, but since I mostly
run these at night I let them go throttled. It works good for me, and
once the initial sync is done (~4G) the updates are typically only a
few megs.

--
-=/>Thom




More information about the fedora-list mailing list