--- sludge_scripts/backup.sh 2011/06/08 13:38:46 1.3 +++ sludge_scripts/backup.sh 2011/06/17 16:17:17 1.4 @@ -1,6 +1,6 @@ #!/bin/bash -VERSION="$Id: backup.sh,v 1.3 2011/06/08 13:38:46 nick Exp $" +VERSION="$Id: backup.sh,v 1.4 2011/06/17 16:17:17 nick Exp $" REMOTE="nick@demandred.dyndns.org" OPTIONS="-avxz -e ssh --delete" LOGDIR=/home/backup/logs @@ -16,8 +16,10 @@ LANFEAR_DIRS=(/home/backup/systems/lanfe cd /home/backup/backups +SAVEIFS=$IFS for bdir in demandred winshare lanfear; do + IFS=$(echo -en "\n\b") [ "$bdir" == "demandred" ] && DIRS=(${DEMANDRED_DIRS[@]}) [ "$bdir" == "winshare" ] && DIRS=(${WINSHARE_DIRS[@]}) [ "$bdir" == "lanfear" ] && DIRS=(${LANFEAR_DIRS[@]}) @@ -28,6 +30,7 @@ do done cd - > /dev/null 2>&1 done +IFS=$SAVEIFS ## ## Compress logs after 5 days and delete logs after 6 months