From 618f1bfb0651ae8d24228dbb5407de73aa8dc17d Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 17 Mar 2014 22:18:52 -0300 Subject: Be ionice at sync-backups --- files/sync-backups | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'files') diff --git a/files/sync-backups b/files/sync-backups index e580c30..4867701 100644 --- a/files/sync-backups +++ b/files/sync-backups @@ -9,7 +9,8 @@ VOLUME="$1" MEDIA="/media/$VOLUME" BWLIMIT="2500" IMAGES="/var/data/crypt/" -RSYNC="nice -n 19 rsync -avH --delete --bwlimit=$BWLIMIT" +RSYNC="ionice -c 3 nice -n 19 rsync -avH --delete --bwlimit=$BWLIMIT" +CP="ionice -c 3 nice -n 19" # Sync backups for a node. function sync_backups_node { @@ -45,7 +46,7 @@ function sync_backups_node { for image in `find $IMAGES -name '*.img' -type f`; do mkdir -p /$MEDIA/$HOSTNAME/images/`dirname $image` echo "Copying image to /$MEDIA/$HOSTNAME/images/`dirname $image`" - cp $image /$MEDIA/$HOSTNAME/images/`dirname $image` + $CP $image /$MEDIA/$HOSTNAME/images/`dirname $image` done fi fi -- cgit v1.2.3