Backups and rsync jobs taking all your io?

home | blog | Terrible people and places | Covid-19 links | Teh Internet | guest blog |rants | placeholder | political | projects | Gwen and Liam | Citadel patched | Tools | Scouts



Try ionice:

ionice -c3 rsync -aSv /from/dir/. /to/dir/.

Another aside, if you need ssh and a different port number, add this to your rsync options
-e 'ssh -p portnumber'
and ionice will set the scheduling class to:

-c 1 (real time - don't use this one on multi user systems!)
-c 2 (best effort "round robin" with -n 0-7 range to set priority on sets of groups to give preference to some processes)
-c 3 (idle only)

eg:

nice -n19 ionice -c2 -n7 rsync -aSv /from/dir/. /to/dir/.
Combines the priority scheduling to the least favorable (19) with nice as well as the lowest priority of any grouped "best effort" process.

Check your results by watching uptime

watch uptime

Test first and see nicer output (progress) and deletes on the remote side (i.e. input changes):

 ionice -c3 rsync --dry-run --progress --delete-during -aSv /from/dir/. /to/dir/.
Drop the --dry-run to do it instead of just telling what would be done.

If that does not help, give the --bwlimit=2000 a shot (2000 KBps limit) on the copy.


If you are trying to rsync to exFat, give this a shot:
Found this gem here: http://blog.marcelotmelo.com/linux/ubuntu/rsync-to-an-exfat-partition/

rsync -rltDv [SRC] [DESTINATION]


If you have a source that has been copied to your destination, and you want to delete (point in time) the files on
the destination that don't exist on the source for the later run:

Warning -use the --dry-run option (-n) before giving this a try!:
/usr/bin/rsync --log-file=/var/log/rsync.log -l -q -a --delete /home user@servertosync:/



[æ]