--- sludge_scripts/backup.sh 2011/06/08 13:38:46 1.3 +++ sludge_scripts/backup.sh 2011/06/17 16:36:20 1.5 @@ -1,8 +1,8 @@ -#!/bin/bash +#!/bin/bash -x -VERSION="$Id: backup.sh,v 1.3 2011/06/08 13:38:46 nick Exp $" +VERSION="$Id: backup.sh,v 1.5 2011/06/17 16:36:20 nick Exp $" REMOTE="nick@demandred.dyndns.org" -OPTIONS="-avxz -e ssh --delete" +OPTIONS=-avxz -e ssh --delete LOGDIR=/home/backup/logs DATE=`date +%Y%m%d` @@ -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