... h6. Contents This page reviews GroundWork Monitor backup and restore processes for the Foundation database, JBoss framework, GroundWork Insight Reports, and Configuration (monarch). The operational databases used by GroundWork Monitor are GWCollageDB (Foundation) which contains state and event data, and the Dashboard database which contains historical information used by Insight and Availability Reports. {toc:minLevel=4|maxLevel=4|printable=false} h4. Foundation Database (GWCollageDB) This section covers backing up and restoring the _Foundation_ database. Additionally, steps to delete the entire _GWCollageDB_ database and reset the initial settings. h6. Backup the Foundation Database You can manually backup the GWCollageDB database at a command line with the following steps: # Open a terminal session and login as: {{root}} # Make sure no one is logged into the system by stopping gwservices with the following command: {code}/usr/local/groundwork/ctlscript.sh stop gwservices{code} # Issue the following command to create a backup sql file: {Note}You will be prompted for a password for the _postgres_ user. In the example below, {{gwcollagedb_backup_09012009.sql}} is the database backup file name where {{09012009}} is the current date.{Note} {code}pg_dump -f /usr/local/groundwork/backup/gwcollagedb-11172011.sql.tar -F t -c -E LATIN1 gwcollagedb{code} # Next, restart gwservices with the following command: {code}/usr/local/groundwork/ctlscript.sh start gwservices{code} h5. Restore the Foundation Database To restore a database that was previously backed up, use the following procedure. # Open a terminal session and login as: {{root}} # Make sure no one is logged into the system by stopping gwservices with the following command: {code}/usr/local/groundwork/ctlscript.sh stop gwservices{code} # Change to the backup directory with the following command: {code}cd /usr/local/groundwork/backup{code} # You should see a file with the name: {code}gwcollagedb-<timestamp>.sql.tar{code} # Restore the old database by entering the following command at the Operating System prompt: {code}pg_restore -d gwcollagedb -F t -c /usr/local/groundwork/backup/gwcollagedb-<timestamp>.sql.tar{code} # Restart gwservices with the following command: {code}/usr/local/groundwork/ctlscript.sh start gwservices{code} # After relaunching your browser, you should clear your browser's cache. h5. Delete and Reset the Foundation Database To delete the entire GWCollageDB database and reset the initial settings, use the following procedure. # Open a terminal session and login as: {{root}}
|
... {code}cd /usr/local/groundwork/core/databases/postgresql{code} # Drop and re-create the current GWCollageDB database by executing the following script: {code}psql -f create-fresh-gwcollagedb.sql postgres{code} # Load the content of GWCollageDB.sql into GWCollageDB database with the following command: {code}psql -f GWCollageDB.sql gwcollagedb postgres{code} # Load all the seed scripts: {code}psql -f postgres-xtra-functions.sql gwcollagedb postgres{code} {code}psql -f GWCollage-Console.sql gwcollagedb postgres{code} {code}psql -f GWCollage-Console.sql gwcollagedb postgres{code} {code}psql -f GWCollage-Metadata.sql gwcollagedb postgres{code} {code}psql -f GWCollage-State.sql gwcollagedb postgres{code} {code}psql -f GWCollage-Version.sql gwcollagedb postgres{code} {code}psql -f GWCollage_PerformanceLabelData.sql gwcollagedb postgres{code} {code}psql -f foundation-base-data.sql gwcollagedb postgres{code} {code}psql -f nagios-properties.sql gwcollagedb postgres{code} {code}psql -f system-properties.sql gwcollagedb postgres{code} {code}psql -f snmp-properties.sql gwcollagedb postgres{code} {code}psql -f syslog-seed.sql gwcollagedb postgres{code} # Restart gwservices with the following command: {code}/usr/local/groundwork/ctlscript.sh start gwservices{code} # After relaunching your browser, you should clear your browser's cache. h4. JBoss Databases The JBoss Portal databases contain information for system users, roles, applications and permissions. h5. Backup the JBoss Databases You can manually backup the JBoss databases at a command line with the following steps: # Open a terminal session and login as: {{root}} # Make sure no one is logged into the system by stopping gwservices with the following command: {code}/usr/local/groundwork/ctlscript.sh stop gwservices{code} Stopping httpd with the following command: {code}/usr/local/groundwork/ctlscript.sh stop apache{code} Issue the following command to create a backup sql file: {Note}You will be prompted for a password for the _postgres_ user. In the example below, jbossdb_backup_09012009.sql is the database backup file name where 09012009 is the current date.{Note} {code}pg_dump -f /usr/local/groundwork/backup/jbossportal_backup_09012009.sql.tar -F t -c -E LATIN1 jbossportal pg_dump -f /usr/local/groundwork/backup/jbossdb_backup_09012009.sql.tar -F t -c -E LATIN1 jbossdb{code} # To restart gwservices enter the following command: {code}/usr/local/groundwork/ctlscript.sh start gwservices{code} # Restart httpd with the following command: {code}/usr/local/groundwork/ctlscript.sh start apache{code} h5. Restore the JBoss Database # Open a terminal session and login as: {{root}} # Make sure no one is logged into the system by stopping gwservices with the following command: {code}/usr/local/groundwork/ctlscript.sh stop gwservices{code} Stopping httpd with the following command: {code}/usr/local/groundwork/ctlscript.sh stop apache{code} # Change the directory to backup/jboss: {code}cd /usr/local/groundwork/backup/jboss{code} # You should see a file with the name: {code}jbossportal_backup_<timestamp>.sql jbossdb_backup_<timestamp>.sql{code} # Drop and recreate the current JBoss databases with the following script: {code}psql -f create-fresh-jbossdb.sql postgres{code} # Restore the old database by entering the following commands at the Operating System prompt: {code}pg_restore -d jbossportal -F t -c jbossportal_backup_<timestamp>.sql.tar pg_restore -d jbossdb -F t -c jbossdb_backup_<timestamp>.sql.tar{code} # Restart gwservices with the following command: {code}/usr/local/groundwork/ctlscript.sh start gwservices{code} # Restart httpd with the following command: {code}/usr/local/groundwork/ctlscript.sh start apache{code} # After relaunching your browser, you should clear your browser's cache. h4. Insight Reports Database (dashboard) This section covers backing up and restoring the _Insight Reports_ database. Additionally, steps to delete the entire dashboard database and reset the initial settings. h5. Backup the Insight Reports Database You can manually backup the dashboard database at a command line with the following steps: # Open a terminal session and login as: {{root}} # Make sure no one is logged into the system by stopping gwservices with the command: {code}/usr/local/groundwork/ctlscript.sh stop gwservices{code} Stopping httpd with the command: {code}/usr/local/groundwork/ctlscript.sh stop apache{code} # Issue the following command to create a backup sql file: {Note}You will be prompted for a password for the _postgres_ user. In the example below, dashboard_backup_09012009.sql is the database backup file name where 09012009 is the current date.{Note} {code}pg_dump -f /usr/local/groundwork/dashboard/backup/dashboard_backup_09012009.sql.tar -F t -c -E LATIN1 dashboard{code} # Restart gwservices with the following command: {code}/usr/local/groundwork/ctlscript.sh start gwservices{code} # Restart httpd with the following command: {code}/usr/local/groundwork/ctlscript.sh start apache{code} h5. Restore the Insight Reports Database To restore a database that was previously backed up, use the following procedure. # Open a terminal session and login as: {{root}} # Make sure no one is logged into the system by stopping gwservices with the command: {code}/usr/local/groundwork/ctlscript.sh stop gwservices{code} Stopping httpd with the command: {code}/usr/local/groundwork/ctlscript.sh stop apache{code} # Change the directory with the following command: {code}cd /usr/local/groundwork/dashboard/backup{code} # Restore the old database by entering the following command at the Operating System prompt: {code}pg_restore -d dashboard -F t -c dashboard_backup_<timestamp>.sql.tar{code} # Restart gwservices with the following command: {code}/usr/local/groundwork/ctlscript.sh start gwservices{code} # Restart httpd with the following command: {code}/usr/local/groundwork/ctlscript.sh start apache{code} # After relaunching your browser, you should clear your browser's cache. h5. Delete and Reset the Insight Reports Database To delete entire dashboard database and reset the initial settings, use the following procedure. # Open a terminal session and login as: {{root}} # Make sure no one is logged into the system by stopping gwservices with the command: {code}/usr/local/groundwork/ctlscript.sh stop gwservices{code} Stopping httpd with the command: {code}/usr/local/groundwork/ctlscript.sh stop apache{code} # Change the directory with the following command. This directory has all the database create SQL statements: {code}cd /usr/local/groundwork/core/databases{code} # Drop and re-create the current dashboard database by executing the following script: {code}psql -f create-fresh-dashboard.sql postgres{code} # Load the content of dashboard_nagios_create.sql into the dashboard database with the following command: {code}psql -f /usr/local/groundwork/core/databases/postgresql/dashboard-db.sql dashboard postgres{code} # Restart gwservices with the following command: {code}/usr/local/groundwork/ctlscript.sh start gwservices{code} # Restart httpd with the following command: {code}/usr/local/groundwork/ctlscript.sh start apache{code} # After relaunching your browser, you should clear your browser's cache. h4. Configuration Database (monarch) This section covers backing up and restoring the Monarch database from the user interface and command line. h5. Backup from the User Interface You have the option to backup the Configuration database via the interface every time a _Commit_ is executed. When you enter the _Control_>_Commit_ option from the Configuration navigation screen, you will be presented with the options to _Abort_, _Backup_ or _Commit_. Selecting the _Backup_ option will create a backup of the _Monarch_ database and _Nagios_ configuration files in the {{/usr/local/groundwork/core/monarch/backup}} directory. After the backup completion message is shown, you can select Abort if you do not want to follow through with a _Commit_. h5. Backup from a Command Line You can manually backup the monarch database at a command line with the following steps: # Open a terminal session and login as: {{root}} # Make sure no one is logged into the system by stopping gwservices with the following command: {code}/usr/local/groundwork/ctlscript.sh stop gwservices{code} Stopping the Nagios deamon with the following command: {code}/usr/local/groundwork/ctlscript.sh stop nagios{code} Stopping httpd with the following command: {code}/usr/local/groundwork/ctlscript.sh stop apache{code} # Issue the following command to create a backup sql file: {Note}* You will be prompted for a password for the _postgres_ user. * In our example, monarch-2013-03-08_15-38-37.sql.tar is the database backup file name where 2013-03-08_15-38-37 is the current timestamp.{Note} {code}pg_dump -f /usr/local/groundwork/core/monarch/backup/monarch-2013-03-08_15-38-37.sql.tar -F t -c -E LATIN1 monarch{code} # Restart gwservices with the following command: {code}/usr/local/groundwork/ctlscript.sh start gwservices{code} Restart httpd with the following command: {code}/usr/local/groundwork/ctlscript.sh start apache{code} Restart Nagios with the following command: {code}/usr/local/groundwork/ctlscript.sh start nagios{code} h5. Restore the Configuration Database # Open a terminal session and login as: {{root}} # Make sure no one is logged into the system by stopping gwservices with the following command: {code}/usr/local/groundwork/ctlscript.sh stop gwservices{code} Stopping the Nagios deamon with the following command: {code}/usr/local/groundwork/ctlscript.sh stop nagios{code} Stopping httpd with the following command: {code}/usr/local/groundwork/ctlscript.sh stop apache{code} # Change the directory to the appropriate timestamped subdirectory within the {{core/monarch/backup/}} directory, such as: {code}cd 2013-03-08_15-38-37{code} You should see a file with the form: {code}monarch-<timestamp>.sql.tar{code} such as: {code}monarch-2013-03-08_15-38-37.sql.tar{code} # Restore the old database by entering the following command at the system prompt: {code}pg_restore -d monarch -F t -c monarch-<timestamp>.sql.tar{code} # Restart gwservices with the following command: {code}/usr/local/groundwork/ctlscript.sh start gwservices{code} Restart httpd with the following command: {code}/usr/local/groundwork/ctlscript.sh start apache{code} Restart Nagios with the following command: {code}/usr/local/groundwork/ctlscript.sh start nagios{code} # After relaunching your browser, you should clear your browser's cache. # Next, to view and confirm the restored configuration, in GroundWork Monitor commit the restored monarch database: _Configuration_>_Control_>_Pre flight test._ And then, _Commit_>_Backup_>_Commit._
|