Diff for /sludge_scripts/backup.sh between versions 1.1.1.1 and 1.7

version 1.1.1.1, 2011/06/07 12:34:47 version 1.7, 2011/06/23 13:32:48
Line 1 Line 1
 #!/bin/bash  #!/bin/bash
   
 REMOTE="nick@demandred.dyndns.org"  declare VERSION="$Id$"
 OPTIONS="-avxz -e ssh --delete"  declare LOGDIR="/home/backup/logs"
 LOGDIR=/home/backup/logs  declare SCRIPT="/home/backup/scripts/backup.pl"
 DATE=`date +%Y%m%d`  declare DATE=`date +%Y%m%d`
   
 DIRS=( /home/nick/database-backup.dump.gz /home/nick/database-backup.dump.yesterday.gz /home/nick/DroidBackups /home/winshare/Pictures /home/cvs /home/nick/bbs /home/nick/notes /home/httpd /home/nick/Documents /home/nick/mail /home/nick/mail-backup /home/winshare/Documents )  
   
 LANFEAR_DIRS=(/home/backup/systems/lanfear/home/nick/Documents /home/backup/systems/lanfear/home/nick/Receipts "/home/backup/systems/lanfear/home/nick/Nick\'s Pictures" /home/backup/systems/lanfear/home/nick/projects /home/backup/systems/lanfear/home/nick/notes)  
   
 [ -d $LOGDIR ] || mkdir -p $LOGDIR  [ -d $LOGDIR ] || mkdir -p $LOGDIR
   
 cd /home/backup/backups  [ -x $SCRIPT ] || \
 mkdir -p demandred  {
 cd demandred          echo "ERROR: Missing $SCRIPT"
 for DIR in "${DIRS[@]}"; do          exit 1
         /usr/bin/rsync $OPTIONS $REMOTE:$DIR . >> $LOGDIR/backup-$DATE.log 2>&1  }
 done  
 cd -  
   
 mkdir -p lanfear  ##
 cd lanfear  ## Call our perl script to handle the dirty work
 for DIR in "${LANFEAR_DIRS[@]}"; do  ##
         /usr/bin/rsync $OPTIONS $REMOTE:$DIR . >> $LOGDIR/backup-$DATE.log 2>&1  $SCRIPT $LOGDIR >> $LOGDIR/backup-$DATE.log 2>&1
 done  
 cd -  
   
 ##  ##
 ## Compress logs after 5 days and delete logs after 6 months  ## Compress logs after 5 days and delete logs after 6 months

Removed from v.1.1.1.1  
changed lines
  Added in v.1.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>