diff options
Diffstat (limited to 'files')
-rw-r--r-- | files/sync-backups | 5 |
1 files changed, 3 insertions, 2 deletions
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 |