Weekly Maintenance

This page reviews Weekly Maintenance for GroundWork Monitor.

Weekly Procedures

This document recommends weekly procedures for backing up your GroundWork Monitor system including steps to backup database and configuration settings.

It is recommended practice to backup the GroundWork databases and the configuration file at least once a week so that a system can be quickly restored from a disaster or system failure. It's up to the System Administrator to decide how long backups should be stored. Additionally, it is highly recommended to backup the backup directory on an external device. The weekly maintenance consists of six steps.
Step 1 - Notify Users

As the first step, you will need to notify the GroundWork Monitor system users of the system maintenance and ask them to log out otherwise they will receive unexpected errors.

You can schedule a maintenance window and notify all GroundWork Monitor system users that the system will be unavailable for a short time. All users should log out of the application otherwise the will receive error messages and will loose their current session.

Step 2 - Shell Access

Next, you will need to get shell access to the GroundWork server. You can do this either by opening a shell on the sever or get remote access with through ssh. Make sure that you are user root to execute all commands.

Step 3 - Stop All Services

Next, stop all services used by GroundWork Monitor with their respective commands:

gwservices:

/usr/local/groundwork/ctlscript.sh stop gwservices

Nagios deamon:

/usr/local/groundwork/ctlscript.sh stop nagios

httpd:

/usr/local/groundwork/ctlscript.sh stop apache

snmptrapd and snmpttd:

/usr/local/groundwork/ctlscript.sh stop snmpttd

syslog-ng:

/usr/local/groundwork/ctlscript.sh stop syslog-ng
Step 4 - Backup Databases and Configuration Settings
GroundWork Databases

Issue the following commands to backup all GroundWork databases:

You will be prompted for a password for the postgres user. In the example below, monarch_backup_09012009.sql is the database backup file name where 09012009 is the current date.
pg_dump -f /usr/local/groundwork/backup/monarch-11172011.sql.tar -F t -c -E LATIN1 monarch
pg_dump -f /usr/local/groundwork/backup/gwcollagedb-11172011.sql.tar -F t -c -E LATIN1 gwcollagedb
pg_dump -f /usr/local/groundwork/backup/dashboard-11172011.sql.tar -F t -c -E LATIN1 dashboard
pg_dump -f /usr/local/groundwork/backup/jbossportal-11172011.sql.tar -F t -c -E LATIN1 jbossportal
pg_dump -f /usr/local/groundwork/backup/jbossdb-11172011.sql.tar -F t -c -E LATIN1 jbossdb
System Configuration Settings

Issue the following commands to backup the system configuration settings for Foundation and Nagios:

tar -czf  /usr/local/groundwork/backup/foundation_config_backup.tar.gz /usr/local/groundwork/config/*
tar -czf  /usr/local/groundwork/backup/nagios_config_backup.tar.gz /usr/local/groundwork/nagios/etc/*
GroundWork Profiles

Issue the following commands to backup GroundWork Profiles:

tar -czf /usr/local/groundwork/backup/profiles_backup.tar.gz /usr/local/groundwork/core/profiles/*
Customized Monarch Modules

Issues the following commands to backup customized Monarch modules:

tar -czf /usr/local/groundwork/backup/monarch_callout_backup.tar.gz /usr/local/groundwork/core/monarch/lib/MonarchCallOut.pm
tar -czf /usr/local/groundwork/backup/monarch_deploy_backup.tar.gz /usr/local/groundwork/core/monarch/lib/MonarchDeploy.pm
tar -czf /usr/local/groundwork/backup/monarch_external_backup.tar.gz /usr/local/groundwork/core/monarch/lib/MonarchExternals.pm
Automation Scripts and Templates

Issue the following commands to backup Monarch automation Scripts and Templates:

tar -czf /usr/local/groundwork/backup/automation_scripts_backup.tar.gz /usr/local/groundwork/automation/scripts/*
tar -czf /usr/local/groundwork/backup/automation_templates_backup.tar.gz /usr/local/groundwork/automation/templates/*
JBoss Configuration Files

JBoss configuration files are all stored in the directory: /usr/local/groundwork/config

tar -czf /usr/local/groundwork/jboss-config .tar.gz/usr/local/groundwork/config/jboss/*
tar -czf /usr/local/groundwork/jboss-config-xml .tar.gz/usr/local/groundwork/config/*jboss*.xml
Step 5 - Purge Session Files and Old Backups

This step covers purging old session files and backup data that can be rotated.

Delete temporary session files with the commands:

rm -rf /tmp/sess*
rm -rf /tmp/tpl*

If you have decided to keep backups for more than a month the following command will purge any backup files older than 28 days:

find /usr/local/groundwork/backup/ -mtime +28 -exec /bin/rm -rf {} \;
Step 6 - Restart All Services

Next, you will need to restart all services used by GroundWork Monitor with their respective commands:

gwservices:

/usr/local/groundwork/ctlscript.sh start gwservices

Nagios deamon:

/usr/local/groundwork/ctlscript.sh start nagios

httpd:

/usr/local/groundwork/ctlscript.sh start apache

snmptrapd and snmpttd:

/usr/local/groundwork/ctlscript.sh start snmpttd

syslog-ng:

/usr/local/groundwork/ctlscript.sh start syslog-ng
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.