nnmrestore.ovpl —
restore a backup created by the nnmbackup.ovpl
script
nnmrestore.ovpl
is the main restore script for
NNMi. The command uses a previous NNMi backup created using the nnmbackup.ovpl
script to restore NNMi to the state stored in the backup files. The scope of the restore is
determined by the content of the backup and by the command-line arguments you provide. The
nnmrestore.ovpl
script restores only the data contained in the backup files.
If you plan to use the nnmbackup.ovpl
script to create an NNMi
backup, then use the nnmrestore.ovpl
script to place database
records on a second NNMi management server, both NNMi management servers must have the same type of operating
system and NNMi version and patch level. Placing the backup data from one NNMi management server
onto a second NNMi management server means that both servers have the same database UUID. After you
restore NNMi on the second NNMi management server, uninstall NNMi from the original NNMi management
server.
The nnmrestore.ovpl
script detects the following:
Was the backup performed on the target system? If the backup was taken locally, the -lic
parameter permits the restoration of licensing information.
Is the target system running an Oracle or Postgres database? If you require a full restore of an Oracle database,
for example, running the nnmrestore.ovpl
script without the
-partial
parameter, the nnmrestore.ovpl
script prompts you
for information to determine if the target system is using the same Oracle database instance as the backup, or if an Oracle
backup and restore operation has already taken place on the target system. You must answer these questions correctly or the
script will copy or merge the SSL certificates incorrectly and the database will become unaccessible from the target installation.
The source directory contains either all of the files required for the restore options you have
selected, or a single tar file. If the source is a tar file, the nnmrestore.ovpl
script
extracts the tar file to a temporary folder in the current working directory. The nnmrestore.ovpl
script removes the temporary folder after completing the restore.
NNMi must be stopped to complete restore operations. If you use the –force
option, the nnmrestore.ovpl
script stops NNMi. If the files present in the source folder indicate that the
original backup was an online
backup, the restore process starts the
nmsdbmgr
process to make sure the embedded database is available. To restore the files from an online backup,
you must use the -force
option.
You must be logged in as as administrator
on Windows systems or
root
on UNIX systems to run the nnmrestore.ovpl
script.
The database restore performed by the nnmrestore.ovpl
script applies only to the embedded
database. If you chose a different database at installation, the table data is not restored using the nnmrestore.ovpl
script. File-system restores work regardless of database type. For details about what you need to restore if you select a
different database at installation, refer to the NNMi Deployment Reference
(available at http://h20230.www2.hp.com/selfsolve/manuals).
nnmrestore.ovpl
supports the following options:
-force
If you provide this option, the nnmrestore.ovpl
script stops NNMi before running the restore
procedure. Also, the script starts the nmsdbmgr
process if it must restore the type of backup
on which the restore is based. This restore from an online backup to use this option.
-lic
If you provide this option, the nnmrestore.ovpl
script restores licensing information.
Note that the script only restores licensing information if it successfully validates that the backup operation was performed on
the same system.
-partial
Without this option, the nnmrestore.ovpl
script restores the database and corresponding
SSL certificates. In the case of a system-to-system restore, the nnmrestore.ovpl
script
merges the nnm.keystore
and nnm.truststore
files with the
target system's nnm.keystore
and nnm.truststore
files.
The merge routine merges all certificate aliases from the backed up stores that do not already exist on the target system.
There is one exception, if the FQDN.selfsigned
key alias exists in both stores, the target system's
key alias is removed and replaced with the one stored in the backup. Before the certificates are merged or restored, a backup is
performed, stored in the same directory, and labeled *.original
.
When you use the -partial
option, the nnmrestore.ovpl
script
will not restore the database and corresponding SSL certificates. The -partial
option is only
useful for restoring configuration files.
-source<directory
>
Specifies the input directory containing the restore files. If the source you provide is a tar file, the
nnmrestore.ovpl
script extracts the tar file to a temporary folder in the current working directory.
The script removes the temporary folder after completing the restore.
-?|-h|-help
Display command usage.
To restore a previous backup:
#./nnmrestore.ovpl –source /tmp/bak/config
To restore with the -force
option:
#./nnmrestore.ovpl –force –source /tmp/bak/all
To restore everything except the database, SSL certificates, and licenses, use the -partial
option:
#./nnmrestore.ovpl –partial –source /tmp/bak/all
To restore everything, including licensing information on a local system, use the -lic
option:
#./nnmrestore.ovpl –lic –source /tmp/bak/all