How do I restore the primary main database in a redundant system?
Purpose
The following steps describe how to restore the primary main database in a redundant NFM-P system using a backup file set created on the same station. The station is called the primary database station in the procedure.
To regain main database redundancy after a database restore, you must reinstantiate the primary database on the standby database station. See How do I reinstantiate the main database from the client GUI? and How do I reinstantiate the main database from a CLI? for information.
You require the following:
Note: You require the following user privileges:
Note: The Oracle management user requires read and write permissions on the backup directory. The user and group names are specified during database installation; the default is ‘oracle’ in the ‘dba’ group.
Steps
1 |
If the database backup file set is on the primary database station, copy the file set to a different station for safekeeping. |
2 |
Stop the standby main server.
|
3 |
Enter the following to switch to the root user: bash$ su ↵ |
4 |
Enter the following to disable the automatic main server startup. # systemctl disable nfmp-main.service ↵ |
5 |
Stop the standby database:
|
6 |
Stop the primary main server.
|
7 |
Enter the following to switch to the root user: bash$ su ↵ |
8 |
Enter the following to disable the automatic main server startup. # systemctl disable nfmp-main.service ↵ |
9 |
If you are restoring the database on a new station, for example, if the current primary database station is unusable, go to Step 15. |
10 |
Log in to the primary database station as the root user. |
11 |
Open a console window. |
12 |
Enter the following to uninstall the primary database: # dnf remove nsp-nfmp-main-db --setopt=clean_requirements_on_remove=false ↵ The dnf utility displays the following prompt: Installed size: nn G Is this ok [y/N]: |
13 |
Enter y. The following is displayed: Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Uninstalling the NFM-P Database... When the uninstallation is complete, the following is displayed: Complete! |
14 |
When the uninstallation is complete, enter the following to reboot the primary database station: # systemctl reboot ↵ The station reboots. |
15 |
Log in as the root user on the primary database station. |
16 |
Open a console window. |
17 |
Remove any files in the /opt/nsp/nfmp/db/tablespace and /opt/nsp/nfmp/db/archivelog directories. |
18 |
Copy the database backup file set to the primary database station. Note: The path to the backup file set must be the same as the path to the file set at creation time. |
19 |
If you are restoring the database on a new station, for example, if the current primary database station is unusable, download or copy the following files for the installed NFM-P release to an empty directory on the database station: where R.r.p is the NSP release identifier, in the form MAJOR.minor.patch v is a version identifier |
20 |
Navigate to the directory that contains the NFM-P installation files. |
21 |
Enter the following: # chmod +x * ↵ |
22 |
Enter the following: # ./OracleSw_PreInstall.sh ↵ Note: The default values displayed by the script are shown as [default]. To accept a default value, 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]: |
23 |
Enter Yes. The following prompt is displayed: Enter the Oracle dba group name [group]: |
24 |
Enter a group name and press ↵. Note: To reduce the complexity of subsequent software upgrades and technical support activities, it is recommended that you accept the default. The following message is displayed: Creating group group if it does not exist... If you specify a new group, the following message is displayed: done |
25 |
If you specify an existing group, the following prompt is displayed: WARNING: Group group already exists locally. Do you want to use the existing group? [Yes/No]: Perform one of the following.
|
26 |
If the default user exists in the specified group, the following prompt is displayed: The user [username] for the group [group] already exists locally. Do you want to use the existing user? [Yes/No]: |
27 |
Perform one of the following.
|
28 |
Perform one of the following.
|
29 |
The following prompt is 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]: Enter Yes or No, as required, and press ↵. 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 |
30 |
When the script execution is complete, enter the following to reboot the database station: # systemctl reboot ↵ The station reboots. |
31 |
When the reboot is complete, log in as the root user on the primary database station. |
32 |
Navigate to the directory that contains the NFM-P installation files. |
33 |
Perform one of the following:
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]: |
34 |
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! |
35 |
If the backup set is compressed as a tar file, you can obtain the absolute path of the database backup file set from the BACKUP_SUMMARY.INFO file. Perform the following to extract the BACKUP_SUMMARY.INFO file from the tar file: # tar -xvf path BACKUP_SUMMARY.INFO where path is the absolute path of the compressed database backup file |
36 |
Perform one of the following.
where path is the absolute path of the directory that contains the database backup file set instance is the standby database instance name IP_address is the standby database IP address 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 |
37 |
When the database restore is complete, close the console window. |
38 |
Log in to the primary main server station as the root user. |
39 |
Enter the following to enable the automatic main server startup: # systemctl enable nfmp-main.service ↵ |
40 |
Start the primary main server.
|
41 |
Perform a full resynchronization of the network to discover the interim changes in the managed network. |
42 |
Start the standby database.
|
43 |
Log in to the standby main server station as the root user. |
44 |
Enter the following to enable the automatic main server startup: # systemctl enable nfmp-main.service ↵ |
45 |
Start the standby main server.
|
46 |
To restore the database redundancy, reinstantiate the primary database on the standby database station, as described in How do I reinstantiate the main database from the client GUI? or How do I reinstantiate the main database from a CLI?. End of steps |