Merge GroupWise Backups Script

0 Likes
over 12 years ago
There were a lot of good bash scripts out there calling dbcopy but we needed a way to create a first time full and then merge our incremental into our full, thus one disaster recovery backup of our Post Office. This script will search your GroupWise Post Office backup directory and remove those files that have been deleted from the source PO directory then merge a incremental backup with dbcopy.

Set this script to run early in the morning. This way you reduce attempts to backup files that have already been backed up.

If you have comments let me know.

Chad

Labels:

How To-Best Practice
Comment List
Anonymous
  • Hey ncisrael,

    I have modified your script to include a check to limit the size of the logfile.
    We don't want the logfile to fill up our disks with years of history information right ?

    I've added a varialble

    tmplog=/var/log/gwbckup.tmp


    and then I do:

    # Checking logfilesize.
    RESULTS_SIZE=`stat -c %s $bcklog`
    if [ "$RESULTS_SIZE" -gt 10240 ];
    then
    echo "sizelimit in effect" >>$bcklog
    mv $bcklog $tmplog
    touch $bcklog
    echo "Logfile exceeded 10 MB Limit. Creating new logfile and transfer">>$bcklog
    echo "the last 10 lines from the old log to the new one">>$bcklog
    tail -n 10 $tmplog >>$bcklog
    fi

    and the end of the dbcopy command.
Related Discussions
Recommended