X-Git-Url: https://codewiz.org/gitweb?p=wizbackup.git;a=blobdiff_plain;f=wizbackup-driver;h=e85d41f2f81f3b3b26569d0dee58b71f0ddf03f1;hp=1a5d0bc8bb06f24b0233ba46f7d0219e27a87ceb;hb=4d66f86bb04ff5c54a0bab875edfb6cfd1e73c6b;hpb=de80ca1013f45886ee60ad3203598f9c79633bf5 diff --git a/wizbackup-driver b/wizbackup-driver index 1a5d0bc..e85d41f 100755 --- a/wizbackup-driver +++ b/wizbackup-driver @@ -1,6 +1,6 @@ #!/bin/bash # -# WizBackup Driver 1.0 +# WizBackup Driver 1.1 # Copyright 2011 Bernie Innocenti # # This program is free software: you can redistribute it and/or modify @@ -45,13 +45,14 @@ else fi for host in $HOSTS; do - opts="--exclude-from $EXCLUDES_DIR/ALWAYS" - if [ -f "$EXCLUDES_DIR/$host" ]; then - opts="$opts --exclude-from $EXCLUDES_DIR/$host" - fi + opts="" + for file in "$EXCLUDES_DIR/ALWAYS" "$EXCLUDES_DIR/$host"; do + [ -f $file ] && opts="$opts --exclude-from $file" + done start_time=$(date +%s) - flock $LOCKDIR/$host wizbackup "$host:/" "$DEST/$host/" $opts >>$LOGFILE 2>&1 + flock -n $LOCKDIR/$host nice ionice -c2 -n6 \ + wizbackup "$host:/" "$DEST/$host/" $opts >>$LOGFILE 2>&1 result=$? end_time=$(date +%s)