Contents
This page reviews how to restore GroundWork Monitor databases and configuration settings.
- 1.0 Obtain Access and Stop Services
- 2.0 Restore Databases and Configuration Settings
- 2.1 To restore GroundWork databases
- 2.2 To restore system configuration settings
- 2.3 To restore GroundWork Profiles
- 2.4 To restore customized monarch modules
- 2.5 To restore automated scripts and templates
- 3.0 Owner Verification
- 4.0 Restart Services
How To Notes
![]() | Command not found If you received a message similar to command not found or no such file or directory you may need to set the environment variables for the shell by running the source /usr/local/groundwork/scripts/setenv.sh script. This works in each shell session and only in shells similar to the Bourne shell, like bash. It will not work in either csh or tcsh. |
![]() | Required password You will need to have the PostgreSQL postgres user password available to perform various commands. This is the same database password that was used for the GroundWork Monitor installation or upgrade. |
![]() | Example file name Throughout this document we refer to a <timestamp> format. For example 2014-02-05_14-06-10 would be the name of a backup directory or part of a backup file name representing the date and time of a backup. |
1.0 Obtain Access and Stop Services
1.1 Obtain 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.
1.2 Stop Services
- Stop all services used by GroundWork Monitor with their respective commands:
service groundwork stop gwservices
service groundwork stop nagios
service groundwork stop apache
service groundwork stop snmpttd
service groundwork stop syslog-ng
2.0 Restore Databases and Configuration Settings
2.1 To restore GroundWork databases
- Change your working directory to backup with the following command:
cd /usr/local/groundwork/backup
- Issue the following commands to restore all GroundWork database:
pg_restore -d gwcollagedb -F t -c gwcollagedb-<timestamp>.sql.tar
pg_restore -d jboss-idm -F t -c jbossdb-idm-<timestamp>.sql.tar
pg_restore -d jboss-jcr -F t -c jboss-jcr-<timestamp>.sql.tar
pg_restore -d dashboard -F t -c dashboard-<timestamp>.sql.tar
pg_restore -d monarch -F t -c monarch-<timestamp>.sql.tar
2.2 To restore system configuration settings
- From the /usr/local/groundwork/backup directory, issue the following commands to restore the system configuration settings for Foundation and Nagios:
tar -xzf foundation_config_backup.tar.gz -C /usr/local/groundwork/config/*
tar -xzf nagios_config_backup.tar.gz -C /usr/local/groundwork/nagios/etc/*
2.3 To restore GroundWork Profiles
- From the /usr/local/groundwork/backup directory, issue the following commands to restore GroundWork Profiles:
tar -xzf profiles_backup.tar.gz -C /usr/local/groundwork/core/profiles/*
2.4 To restore customized monarch modules
- From the /usr/local/groundwork/backup directory, issue the following commands to restore customized Monarch modules:
tar -xzf monarch_callout_backup.tar.gz -C /usr/local/groundwork/core/monarch/lib/MonarchCallOut.pm
tar -xzf monarch_deploy_backup.tar.gz -C /usr/local/groundwork/core/monarch/lib/MonarchDeploy.pm
tar -xzf monarch_external_backup.tar.gz -C /usr/local/groundwork/core/monarch/lib/MonarchExternals.pm
2.5 To restore automated scripts and templates
- From the /usr/local/groundwork/backup directory, issue the following commands to restore monarch automation scripts and templates:
tar -xzf automation_scripts_backup.tar.gz -C /usr/local/groundwork/core/monarch/automation/scripts/*
tar -xzf automation_templates_backup.tar.gz -C /usr/local/groundwork/core/monarch/automation/templates/*
3.0 Owner Verification
- Make sure that the owner for the restored configuration files is still correct. Issue the following commands 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/*
4.0 Restart Services
- Next, you will need to restart all services used by GroundWork Monitor with their respective commands:
service groundwork start gwservices
service groundwork start nagios
service groundwork start apache
service groundwork start snmpttd
service groundwork start syslog-ng