... This page reviews how to restore GroundWork Monitor databases and configuration settings. {toc:minLevel=4|maxLevel=5|printable=false} h4. 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. h5. 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. h5. Step 2 - Stop All Services Next, stop all services used by _GroundWork Monitor_ with their respective commands: * Stop gwservices {code}/usr/local/groundwork/ctlscript.sh stop gwservices{code} * Stop Nagios deamon {code}/usr/local/groundwork/ctlscript.sh stop nagios{code} * Stop httpd {code}/usr/local/groundwork/ctlscript.sh stop apache{code} * Stop snmptrapd and snmpttd {code}/usr/local/groundwork/ctlscript.sh stop snmpttd{code} * Stop syslog-ng {code}/usr/local/groundwork/ctlscript.sh stop syslog-ng{code} h5. Step 3 - Backup Databases and Configuration Settings Issue the following commands to restore all _GroundWork_ databases:
|
{Note}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.{Note}
|
{code}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{code} Issue the following commands to restore the system configuration settings for _Foundation_ and _Nagios_: {code}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/*{code} Issue the following commands to restore _GroundWork Profiles_: {code}tar -xzf /usr/local/groundwork/backup/profiles_backup.tar.gz -C /usr/local/groundwork/core/profiles/*{code} Issues the following commands to restore customized _Monarch_ modules: {code}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{code} Issue the following commands to restore _Monarch_ automation scripts and templates: {code}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/*{code} Make sure that the owner for the restored configuration files is still correct. Issue the following command to adjust the file owner: {code}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/*{code} h5. Step 4 - Restart All Services Next, you will need to restart all services used by _GroundWork Monitor_ with their respective commands: * Start gwservices {code}/usr/local/groundwork/ctlscript.sh start gwservices{code} * Start Nagios deamon {code}/usr/local/groundwork/ctlscript.sh start nagios{code} * Start httpd {code}/usr/local/groundwork/ctlscript.sh start apache{code} * Start snmptrapd and snmpttd {code}/usr/local/groundwork/ctlscript.sh start snmpttd{code} * Start syslog-ng {code}/usr/local/groundwork/ctlscript.sh start syslog-ng{code} After relaunching your browser, you should clear your browser's cache.
|