Merge GroupWise Backups Script

Merge GroupWise Backups Script

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 (1)
Attachments

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Comments
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.
Top Contributors
Version history
Revision #:
6 of 6
Last update:
‎2020-02-20 21:19
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.