Ignore:
Timestamp:
11/27/06 17:16:15 (5 years ago)
Author:
xistence
Message:

Updated the backup script to also check the status of rsync for status number 24. Man rsync for more inforamtion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/scripts/backup.bash

    r206 r207  
    7676/usr/local/bin/rsync -av --relative --delete /usr/home/ $BACKUPDIR --exclude-from=/tmp/exclude.$$ 
    7777 
    78 if [ $? -ne 0 ]; then 
    79         logger -s -p user.err -t backup "rsync failed. Do not trust backup ($BACKUPDIR)" 
    80         /sbin/umount /backup 
    81         exit 1 
     78EXITCODE=$? 
     79 
     80if [ $EXITCODE -ne 0 ]; then 
     81        if [ $EXITCODE -ne 24 ]; then 
     82                logger -s -p user.err -t backup "rsync failed. Do not trust backup ($BACKUPDIR)" 
     83                /sbin/umount /backup 
     84                exit 1 
     85        fi 
    8286fi 
     87 
    8388 
    8489echo "Backup complete! Deleting oldest backup (14 days ago)" 
Note: See TracChangeset for help on using the changeset viewer.