version 1.3, 2011/06/08 13:38:46
|
version 1.5, 2011/06/17 16:36:20
|
Line 1
|
Line 1
|
#!/bin/bash |
#!/bin/bash -x |
|
|
VERSION="$Id$" |
VERSION="$Id$" |
REMOTE="nick@demandred.dyndns.org" |
REMOTE="nick@demandred.dyndns.org" |
OPTIONS="-avxz -e ssh --delete" |
OPTIONS=-avxz -e ssh --delete |
LOGDIR=/home/backup/logs |
LOGDIR=/home/backup/logs |
DATE=`date +%Y%m%d` |
DATE=`date +%Y%m%d` |
|
|
Line 16 LANFEAR_DIRS=(/home/backup/systems/lanfe
|
Line 16 LANFEAR_DIRS=(/home/backup/systems/lanfe
|
|
|
cd /home/backup/backups |
cd /home/backup/backups |
|
|
|
SAVEIFS=$IFS |
for bdir in demandred winshare lanfear; |
for bdir in demandred winshare lanfear; |
do |
do |
|
IFS=$(echo -en "\n\b") |
[ "$bdir" == "demandred" ] && DIRS=(${DEMANDRED_DIRS[@]}) |
[ "$bdir" == "demandred" ] && DIRS=(${DEMANDRED_DIRS[@]}) |
[ "$bdir" == "winshare" ] && DIRS=(${WINSHARE_DIRS[@]}) |
[ "$bdir" == "winshare" ] && DIRS=(${WINSHARE_DIRS[@]}) |
[ "$bdir" == "lanfear" ] && DIRS=(${LANFEAR_DIRS[@]}) |
[ "$bdir" == "lanfear" ] && DIRS=(${LANFEAR_DIRS[@]}) |
Line 28 do
|
Line 30 do
|
done |
done |
cd - > /dev/null 2>&1 |
cd - > /dev/null 2>&1 |
done |
done |
|
IFS=$SAVEIFS |
|
|
## |
## |
## Compress logs after 5 days and delete logs after 6 months |
## Compress logs after 5 days and delete logs after 6 months |