This page reviews how to restore GroundWork Monitor databases and configuration settings.
Restoring GroundWork Monitor Databases and Configuration Settings
After a system failure you may need to re-install GroundWork Monitor. In addition, the last available backup can be used to restore the data and the system configuration. The backup consists of all GroundWork databases and the Nagios and Foundation configuration files. If the backups are stored on an external device (tape other server) copy them over to the MonitorServer into the /usr/local/groundwork/backup directory. The following sections assume that all the backups are present in this directory. The restore procedure consists of four steps.
Step 1 - Shell Access
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 2 - Stop All Services
Next, stop all services used by GroundWork Monitor with their respective commands:
- Stop gwservices
/usr/local/groundwork/ctlscript.sh stop gwservices
- Stop Nagios deamon
/usr/local/groundwork/ctlscript.sh stop nagios
- Stop httpd
/usr/local/groundwork/ctlscript.sh stop apache
- Stop snmptrapd and snmpttd
/usr/local/groundwork/ctlscript.sh stop snmpttd
- Stop syslog-ng
/usr/local/groundwork/ctlscript.sh stop syslog-ng
Step 3 - Backup Databases and Configuration Settings
Issue the following commands to restore all GroundWork databases:
![]() | You will be prompted for a password for the postgres user. Also, in the example below, monarch_backup_09012009.sql is the database backup file name where 09012009 is the current date. |
pg_restore -d monarch -F t -c /usr/local/groundwork/backup/monarch_backup_09012009.sql.tar pg_restore -d gwcollagedb -F t -c /usr/local/groundwork/backup/GWCollageDB_backup_09012009.sql.tar pg_restore -d dashboard -F t -c /usr/local/groundwork/backup/dashboard_backup_09012009.sql.tar pg_restore -d jbossportal -F t -c /usr/local/groundwork/backup/jboss/jbossportal_backup_09012009.sql.tar pg_restore -d jbossdb < /usr/local/groundwork/backup/jboss/jbossdb_backup_09012009.sql.tar
Issue the following commands to restore the system configuration settings for Foundation and Nagios:
tar -xzf /usr/local/groundwork/backup/foundation_config_backup.tar.gz -C /usr/local/groundwork/config/* tar -xzf /usr/local/groundwork/backup/nagios_config_backup.tar.gz -C /usr/local/groundwork/nagios/etc/*
Issue the following commands to restore GroundWork Profiles:
tar -xzf /usr/local/groundwork/backup/profiles_backup.tar.gz -C /usr/local/groundwork/core/profiles/*
Issues the following commands to restore customized Monarch modules:
tar -xzf /usr/local/groundwork/backup/monarch_callout_backup.tar.gz -C /usr/local/groundwork/core/monarch/lib/MonarchCallOut.pm tar -xzf /usr/local/groundwork/backup/monarch_deploy_backup.tar.gz -C /usr/local/groundwork/core/monarch/lib/MonarchDeploy.pm tar -xzf /usr/local/groundwork/backup/monarch_external_backup.tar.gz -C /usr/local/groundwork/core/monarch/lib/MonarchExternals.pm
Issue the following commands to restore Monarch automation scripts and templates:
tar -xzf /usr/local/groundwork/backup/automation_scripts_backup.tar.gz -C /usr/local/groundwork/automation/scripts/* tar -xzf /usr/local/groundwork/backup/automation_templates_backup.tar.gz -C /usr/local/groundwork/automation/templates/*
Make sure that the owner for the restored configuration files is still correct. Issue the following command to adjust the file owner:
chown -R nagios.nagios /usr/local/groundwork/config/* chown -R nagios.nagios /usr/local/groundwork/nagios/etc/* chown -R nagios.nagios /usr/local/groundwork/automation/* chown -R nobody.nobody /usr/local/groundwork/core/monarch/lib/* chown -R nagios.nobody /usr/local/groundwork/core/profiles/*
Step 4 - Restart All Services
Next, you will need to restart all services used by GroundWork Monitor with their respective commands:
- Start gwservices
/usr/local/groundwork/ctlscript.sh start gwservices
- Start Nagios deamon
/usr/local/groundwork/ctlscript.sh start nagios
- Start httpd
/usr/local/groundwork/ctlscript.sh start apache
- Start snmptrapd and snmpttd
/usr/local/groundwork/ctlscript.sh start snmpttd
- Start syslog-ng
/usr/local/groundwork/ctlscript.sh start syslog-ng
After relaunching your browser, you should clear your browser's cache.