Simple script to backup Groupwise 7 configuration files on SLES Linux


I’m about to upgrade our Groupwise infrastructure, and I wanted to write a simple script that would backup and archive important Groupwise configuration files.  I’m not proficient at scripting, but here’s what I came up with.  Please recommend additional files to include if I have overlooked anything.

####################################
### Begin gwbkup.sh
### script to backup Groupwise configuration files
### /home/backups/gw7cfg is the directory to backup files to
### backup Groupwise agent configuration files
cp /opt/novell/groupwise/agents/share/* /home/backups/gw7cfg/
cp /etc/opt/novell/groupwise/gwha.conf /home/backups/gw7cfg/
### backup Apache web server configuration files
cp /etc/apache2/httpd.conf /home/backups/gw7cfg/
cp /etc/apache2/conf.d/gw* /home/backups/gw7cfg/
### Backup WebAccess configuration files
cp /opt/novell/groupwise/webaccess/webacc.cfg /home/backups/gw7cfg/
cp /opt/novell/groupwise/webaccess/commgr.cfg /home/backups/gw7cfg/commgr.cfg.webacc
cp /opt/novell/groupwise/webaccess/spellchk.cfg /home/backups/gw7cfg/
### Backup WebPublisher configuration files
cp /opt/novell/groupwise/webpublisher/webpub.cfg /home/backups/gw7cfg/
cp /opt/novell/groupwise/webpublisher/commgr.cfg /home/backups/gw7cfg/commgr.cfg.webpub
cp /opt/novell/groupwise/webaccess/ldap.cfg /home/backups/gw7cfg/
### Backup Tomcat configuration files
cp -r /etc/tomcat5/base/* /home/backups/gw7cfg/
### backup gwia files specific to each gateway
### may have more than one gwia per Groupwise system, so append gateway
### name to end of file
cp /mail/gwiado/wpgate/gwia703/exepath.cfg /home/backups/gw7cfg/exepath.cfg.gwia703
cp /mail/gwiado/wpgate/gwia703/gwac.db /home/backups/gw7cfg/gwac.db.gwia703
cp /mail/gwiado/wpgate/gwia703/gwauth.cfg /home/backups/gw7cfg/gwauth.cfg.gwia703
cp /mail/gwiado/wpgate/gwia703/mimetype.cfg /home/backups/gw7cfg/mimetype.cfg.gwia703
### backup webaccess files specific to each gateway
### may have more than one gwia per Groupwise system, so append gateway
### name to end of file
cp /mail/webdo/wpgate/webac703/comint.cfg /home/backups/gw7cfg/comint.cfg.webac703
cp /mail/webdo/wpgate/webac703/commgr.cfg /home/backups/gw7cfg/commgr.cfg.webac703
cp /mail/webdo/wpgate/webac703/gwac.db /home/backups/gw7cfg/gwac.db.webac703
cp /mail/webdo/wpgate/webac703/mimetype.cfg /home/backups/gw7cfg/mimetype.cfg.webac703

### Backup Groupwise monitor files
cp /opt/novell/groupwise/gwmonitor/gwmonitor.cfg /home/backups/gw7cfg/gwmonitor.cfg
cp /opt/novell/groupwise/gwmonitor/default/gwmonitor.cfg /home/backups/gw7cfg/gwmonitor.cfg.default
cp /opt/novell/groupwise/gwmonitor/default/gwmonitor.xml /home/backups/gw7cfg/gwmonitor.xml
### tar configuration files and label archive with today's date
tar -pcvzf /home/backups/$(date +%m-%d-%Y).tar.gz /home/backups/gw7cfg/
### Remove old configuration files rm -r /home/backups/gw7cfg/* 
### End gwbkup.sh ####################################

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: