How do I test an NFM-P main database restore?

Purpose

It is strongly recommended that you regularly test a recent main database backup to ensure that you can use the backup to restore the database in the event of a failure.

Perform this procedure test the success of a main-database restore operation.

Note: You require root user privileges on the station that hosts the restored database.

Note: You require the Oracle management user name, group name, and password from the main database.

CAUTION 

CAUTION

Service Disruption

Restoring a main database on a station that has connectivity to the managed network or other NFM-P components can cause a service disruption.

Ensure that you perform the procedure only on an isolated station.

Note: Before you can test a database restore on a station, you must ensure that no NFM-P software is installed on the station.

Steps
 

Generate comparison points for the main database, for example, the number of managed devices and cards, by creating an inventory of information, as described in the NSP NFM-P User Guide. This information is used to compare against the restored database information in a test environment to check the validity of the database backup.


Ensure that the station on which you plan to restore the database, called the test station, has the same system configuration as the actual database station, for example, partitioning, OS version, and OS patch level.


Identify a recent main database backup.


Log in to the test station as the root user.


Copy the database backup file set to the test station.

Note: The path to the backup file set on the test station must be the same as the path of the backup file set on the database station.


Transfer the following NFM-P installation files for the existing release to an empty directory on the test station:

  • nsp-nfmp-jre-R.r.p-rel.v.rpm

  • nsp-nfmp-config-R.r.p-rel.v.rpm

  • nsp-nfmp-oracle-R.r.p-rel.v.rpm

  • nsp-nfmp-main-db-R.r.p-rel.v.rpm

  • OracleSw_PreInstall.sh

where

R.r.p is the NSP release identifier, in the form MAJOR.minor.patch

v is a version identifier


Open a console window.


Navigate to the directory that contains the NFM-P installation files.


Enter the following:

chmod +x * ↵


10 

Enter the following:

./OracleSw_PreInstall.sh ↵

Note: A default value is displayed in brackets []. To accept the default, press ↵.

The following prompt is displayed:

This script will prepare the system for a new install/restore of an NFM-P Version R.r Rn database.

Do you want to continue? [Yes/No]:


11 

Enter Yes. The following prompt is displayed:

Enter the Oracle dba group name [group]:


12 

Enter the group name of the Oracle management user from the current database deployment.

The following messages and prompt are displayed:

Creating group group if it does not exist ... done 

Enter the Oracle user name [user]: 


13 

Enter the Oracle management user name from the current database deployment.

The following messages and prompt are displayed:

Oracle user [user] new home directory will be [/opt/nsp/nfmp/oracle19].

Checking or Creating the Oracle user home directory /opt/nsp/nfmp/oracle19...

Checking user user...

Adding user...

Changing ownership of the directory /opt/nsp/nfmp/oracle19 to user:group.

About to unlock the UNIX user [user]

Unlocking password for user user.

passwd: Success

Unlocking the UNIX user [user] completed

Please assign a password to the UNIX user user ..

New Password:


14 

Enter the password of the Oracle management user.

The following prompt is displayed:

Re-enter new Password:


15 

Re-enter the password. The following message is displayed if the password change is successful:

passwd: password successfully changed for user 

The following message and prompt are displayed:

Specify whether an NFM-P server will be installed on this workstation.

The database memory requirements will be adjusted to account for the additional load.

Will the database co-exist with an NFM-P server on this workstation [Yes/No]:


16 

Enter Yes or No, as required, based on the existing NFM-P deployment.

Messages like the following are displayed as the script execution completes:

INFO: About to set kernel parameters in /etc/sysctl.conf...

INFO: Completed setting kernel parameters in /etc/sysctl.conf...

INFO: About to change the current values of the kernel parameters

INFO: Completed changing the current values of the kernel parameters

INFO: About to set ulimit parameters in /etc/security/limits.conf...

INFO: Completed setting ulimit parameters in /etc/security/limits.conf...

INFO: Completed running Oracle Pre-Install Tasks


17 

Enter the following:

dnf install *.rpm ↵

The dnf utility resolves any package dependencies, and displays the following prompt:

Total size: nn G

Installed size: nn G 

Is this ok [y/d/N]: 


18 

Enter y. The following and the installation status are displayed as each package is installed:

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

The package installation is complete when the following is displayed:

Complete!


19 

Enter the following:

samrestoreDb path

where path is the absolute path of the directory that contains the database backup file set

The database restore begins.

If the backup file set has been created using file compression, messages like the following are displayed.

About to uncompress backup files under path

Completed uncompressing backup files under path

Messages like the following are displayed as the restore progresses.

Restore log is /opt/nsp/nfmp/db/install/NFM-P_Main_Database.restore.yyyy.mm.dd-hh.mm.ss.stdout.txt

<date time> working..

<date time> Performing Step 1 of 7 - Initializing ..

<date time> Executing StartupDB.sql ...

<date time> Performing Step 2 of 7 - Extracting backup files .....

<date time> Performing Step 3 of 7 - Restoring archive log files ..

<date time> Performing Step 4 of 7 - Executing restore.rcv ..........

<date time> Performing Step 5 of 7 - Restoring Accounting tablespaces .......

<date time> Performing Step 6 of 7 - Opening database .....

<date time> working....

<date time> Executing ConfigRestoreDB.sql ....................

<date time> working...............

<date time> Performing Step 7 of 7 - Configuring SAM Server settings ...

The following is displayed when the restore is complete:

<date time> Database restore was successful

DONE


20 

Review the comparison points of the restored database with the actual database, as generated in Step 1 . If the databases are the same, the backup is valid and the restore operation is successful.

End of steps