• No results found

You will be prompted for a password for the postgres user. In the example below,

N/A
N/A
Protected

Academic year: 2021

Share "You will be prompted for a password for the postgres user. In the example below,"

Copied!
8
0
0

Loading.... (view fulltext now)

Full text

(1)

1. 2. 3. 4. 1. 2. 3. 4. 5.

Backup and Restore

This page reviews GroundWork Monitor backup and restore processes.

Backup and Restore Processes

This page presents the 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.

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.

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 command:

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

Issue the following command to create a backup sql file.

You will be prompted for a password for the postgres user. In the example below,

is the database backup file name where is the current date.

gwcollagedb_backup_09012009.sql 09012009

pg_dump -f /usr/local/groundwork/backup/gwcollagedb-11172011.sql.tar -F t -c -E LATIN1 gwcollagedb

Next, restart gwservices with the following command:

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

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 command:

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

Change the directory to the foundation/backup with the following command:

cd /usr/local/groundwork/foundation/backup

You should see a file with the name:

gwcollagedb_backup_<timestamp>.sql.tar

(2)

5. 6. 7. 1. 2. 3. 4. 5. 6. pg_restore -d gwcollagedb -F t -c /usr/local/groundwork/backup/gwcollagedb_backup_<timestamp>.sql.tar

Restart gwservices with the following command:

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

After relaunching your browser, you should clear your browser's cache.

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

Make sure no one is logged into the system by stopping gwservices with the command:

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

Set the environment variables for the shell.

source /usr/local/groundwork/scripts/setenv.sh

Change the directory with the following command. This directory has all the database create SQL statements.

cd /usr/local/groundwork/core/databases/postgresql

Drop and re-create the current GWCollageDB database by executing the following script:

psql -f "create-fresh-gwcollagedb.sql" postgres

Load the content of GWCollageDB.sql into GWCollageDB database with the following command:

psql -f "GWCollageDB.sql" postgres

Load all the seed scripts:

psql -f "/usr/local/groundwork/core/databases/postgresql/postgres-xtra-functions.sql" gwcollagedb postgres psql -f "/usr/local/groundwork/core/databases/postgresql/GWCollage-Console.sql" gwcollagedb postgres psql -f "/usr/local/groundwork/core/databases/postgresql/GWCollage-Console.sql" gwcollagedb postgres psql -f "/usr/local/groundwork/core/databases/postgresql/GWCollage-Metadata.sql" gwcollagedb postgres psql -f "/usr/local/groundwork/core/databases/postgresql/GWCollage-State.sql" gwcollagedb postgres psql -f "/usr/local/groundwork/core/databases/postgresql/GWCollage-Version.sql" gwcollagedb postgres psql -f "/usr/local/groundwork/core/databases/postgresql/GWCollage-PerformanceLabelData.sql" gwcollagedb postgres psql -f "/usr/local/groundwork/core/databases/postgresql/foundation-base-data.sql" gwcollagedb postgres psql -f "/usr/local/groundwork/core/databases/postgresql/nagios-properties.sql" gwcollagedb postgres psql -f "/usr/local/groundwork/core/databases/postgresql/system-properties.sql" gwcollagedb postgres psql -f "/usr/local/groundwork/core/databases/postgresql/snmp-properties.sql" gwcollagedb postgres

(3)

7. 8. 1. 2. 3. 4. 1. 2. 3. 4.

Restart gwservices with the following command:

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

After relaunching your browser, you should clear your browser's cache.

JBoss Databases

The JBoss Portal databases contain information for system users, roles, applications and permissions.

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 command:

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

Stopping httpd with the command:

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

Issue the following command to create a backup sql file.

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.

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

To restart gwservices enter the following command:

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

Restart httpd with the following command:

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

Restore the JBoss Database

Open a terminal session and login as: root

Make sure no one is logged into the system stopping gwservices with the command:

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

Stopping httpd with the command:

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

Change the directory to backup/jboss with the following command:

(4)

4. 5. 6. 7. 8. 9. 1. 2. 3. 4. 5.

You should see a file with the name:

jbossportal_backup_<timestamp>.sql jbossdb_backup_<timestamp>.sql

Drop and recreate the current JBoss databases with the following script:

psql -f "create-fresh-jbossdb.sql" postgres

Restore the old database by entering the following commands at the Operating System prompt:

pg_restore -d jbossportal -F t -c jbossportal_backup_<timestamp>.sql.tar pg_restore -d jbossdb -F t -c jbossdb_backup_<timestamp>.sql.tar

Restart gwservices with the following command:

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

Restart httpd with the following command:

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

After relaunching your browser, you should clear your browser's cache.

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.

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:

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

Stopping httpd with the command:

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

Issue the following command to create a backup sql file.

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.

pg_dump -f /usr/local/groundwork/dashboard/backup/dashboard_backup_09012009.sql.tar -F t -c -E LATIN1 dashboard

Restart gwservices with the following command:

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

(5)

5. 1. 2. 3. 4. 5. 6. 7. 1. 2. 3. 4. 5.

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

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:

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

Stopping httpd with the command:

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

Change the directory with the following command:

cd /usr/local/groundwork/dashboard/backup

Restore the old database by entering the following command at the Operating System prompt:

pg_restore -d dashboard -F t -c dashboard_backup_<timestamp>.sql.tar

Restart gwservices with the following command:

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

Restart httpd with the following command:

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

After relaunching your browser, you should clear your browser's cache.

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:

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

Stopping httpd with the command:

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

Change the directory with the following command. This directory has all the database create SQL statements.

cd /usr/local/groundwork/core/databases

Drop and re-create the current dashboard database by executing the following script:

psql -f "create-fresh-dashboard.sql" postgres

(6)

5. 6. 7. 8. 1. 2. 3. 4.

psql -f "/usr/local/groundwork/core/databases/postgresql/dashboard-db.sql" dashboard postgres

Restart gwservices with the following command:

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

Restart httpd with the following command:

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

After relaunching your browser, you should clear your browser's cache.

Configuration Database (monarch)

This section covers backing up and restoring the Monarch database from the user interface, a command line.

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> option from the Configuration navigation screen, you will be presented with the options to , or . Selecting the

Commit Abort Backup Commit

option will create a backup of the database and configuration files in the

Backup Monarch Nagios

directory. After the backup completion message is shown, you can select Abort if you do /usr/local/groundwork/core/monarch/backup

not want to follow through with a Commit.

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 command:

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

Stopping the Nagios deamon with the command:

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

Stopping httpd with the command:

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

Deleting temporary session files with the commands:

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

Issue the following command to create a backup sql file.

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/core/monarch/backup/monarch_backup_09012009.sql.tar -F t -c -E LATIN1 monarch

(7)

4. 5. 6. 1. 2. 3. 4. 5. 6. 7. 8.

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

Restart httpd with the following command:

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

Restart Nagios with the following command:

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

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 command:

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

Stopping the Nagios deamon with the command:

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

Stopping httpd with the command:

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

Deleting temporary session files with the commands:

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

Change the directory to:

cd /usr/local/groundwork/core/monarch/backup

You should see a file with the name:

monarch_backup_<_timestamp_>.sql

Restore the old database by entering the following command at the system prompt:

pg_restore -d monarch F t -c monarch_backup_<timestamp>.sql.tar

Restart gwservices with the following command:

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

Restart httpd with the following command:

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

(8)

8.

9. 10.

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

After relaunching your browser, you should clear your browser's cache.

Next, to view and confirm the restored configuration, use the web interface to commit the restored monarch database: Configuration>

> And then, > >

References

Related documents

[r]

VERIZON WIRELESS’S PRACTICES TO PREVENT MOBILE CRAMMING Verizon Wireless’s practices to prevent cramming fall into three broad categories: (1) adherence to the

To capture the traditional spiritual power of the Bozhe agents that is highly revered and honored by the Sabat Bet Gurage peoples, sheyikh Budalla seemed to have

[r]

Such a collegiate cul- ture, like honors cultures everywhere, is best achieved by open and trusting relationships of the students with each other and the instructor, discussions

For the primary endpoint of culture- or PCR-confirmed influenza PD-ILI caused by any influenza viral type/subtype (regardless of similarity to the vaccine), IIV-HD was significantly

The approach taken has introduced as many realistic constraints as possible in order to maximise the value of the framework while at the same time striving

First the Inca Kola ad shows a remarkable gender stereotype where women is the housewife and have to serve to her family, in this case the mother is serving to his husband and