nnmbackup.ovpl — script used to back up NNMi data and files
nnmbackup.ovpl
[-?|-h|-help] [-type (online|offline)] [-scope
(config|topology|events|all)] [-force] [-archive] [-noTimeStamp] -target
<directory
>
nnmbackup.ovpl
is the main backup script for
NNMi. For NNMi installations using an embedded database, the nnmbackup.ovpl
script determines the directories and tables to back up using the
%NNM_DATA%\shared\nnm\backup.properties
(Windows) or
$NNM_DATA/shared/nnm/backup.properties
(UNIX) file. The
backup.properties
file also defines any files and
directories that require extra processing during the restore phase. The nnmbackup.ovpl
script accepts arguments to determine things like backup scope (config
,
topology
, events
, all
),
backup location, and backup type (online
or offline
).
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.
Before running the nnmbackup.ovpl
script, make sure you have adequate storage space in the target
directory. For most NNMi installations, if you have enough space to store the contents of the NNMi
installation, %NNM_DATA%
(Windows), or $NNM_DATA
(UNIX) directories,
you should have adequate storage space. Check the available storage space in the following locations:
Windows: %NnmInstallDir%
UNIX:/opt/OV
(UNIX)
If you selected the embedded database option during the NNMi installation, you can find the embedded
database data storage in the %NNM_DATA%\shared\nnm\databases\Postgres
(Windows)
or $NNM_DATA/shared/nnm/databases/Postgres
(UNIX) directory.
The target directory contains all of the files applicable for the backup options you
have selected, or a single tar file if you use the –archive
option. Each backup operation stores files in a parent
directory called nnm-bak-<
inside of target
directory. Any database operations occurring during the backup are included
in the backup. You can compress the files after the backup completes.TIMESTAMP
>
Files that require extra processing during the restore phase are stored with their full
paths beneath the target_directory/special_files/handling_routine
directory.
During the restore phase, NNMi selects files for exclusion, restoration, or merge. For more information, see the
nnmrestore.ovpl
reference page, or the UNIX manpage.
The nnmbackup.ovpl
script includes the necessary data to perform a restore operation.
You must be logged in as administrator on Windows NNMi management servers or
root on UNIX NNMi management servers to run the nnmbackup.ovpl
script.
Database backups performed by the nnmbackup.ovpl
script only apply to the
embedded database. If you chose a different database at install time, the table data is not backed up using
this script. File-system backups work regardless of the database type. For details
about how to back up NNMi data if you select a different database at install time, see the
NNMi Deployment Reference (available at http://h20230.www2.hp.com/selfsolve/manuals).
The nnmbackup.ovpl
script supports the following options:
-type (online|offline)
This option determines the type of backup to be performed. If you specify the online
option,
both NNMi and the nmsdbmgr
process must be running before running the
nnmbackup.ovpl
script. If you specify the offline
option,
completely stop NNMi before running the nnmbackup.ovpl
script.
-scope (config|topology|events|all)
This option determines the scope of the backup operation. There are two types of data that
the nnmbackup.ovpl
script backs up: files in the file system and tables in the database.
The -scope
option value for files in the file system is always applicable, regardless of the
backup type you choose (see the –type
option). However, the -scope
option value for tables in the database is applicable only when you run an online backup using
the -type online
) option. For offline scoped backups, you get the entire contents of the
database, not just the scope you request. For this reason, HP recommends that you do not define scope
when doing offline backups (the default is all
). The scopes
available are config
, topology
,
events
, and
all
. Each scope includes all of the data and files from the previous scope
(all
→ events
→
topology
→ config
).
The %NNM_DATA%\shared\nnm\backup.properties
(Windows) or
$NNM_DATA/shared/nnm/backup.properties
(UNIX) file contains a list
of the files and tables backed up for each scope.
-force
If you use the -force
option, the nnmbackup.ovpl
script
starts and stops NNMi based on the type of backup you requested. For online backups, if NNMi is not running, the
nnmbackup.ovpl
script starts the nmsdbmgr
process
(required for backups). For offline backups, if NNMi is running, the command stops all NNMi processes.
-archive
If you provide the -archive
option, the nnmbackup.ovpl
script
stores the backup files in a tar file in the target directory.
-noTimeStamp
With this option, the nnmbackup.ovpl
script
stores the backup files in a target directory without a timestamp in the name, i.e. just "nnm-bak" or "nnm-bak.tar".
Any previous backup which exists with that same folder/file name will be renamed to have ".previous" suffix.
If there is already a ".previous" backup, it will be deleted.
This option is provided to allow for daily backups, keeping latest two successful backups, and
not keeping every backup that has been performed, over time, to reduce disk usage.
-target
<directory
>
Specifies the output directory where you want the backup files stored. The nnmbackup.ovpl
script creates a parent directory named nnm-bak-<
inside the target directory where all backup files are stored. If the TIMESTAMP
>archive
option is present,
the nnmbackup.ovpl
script creates a temporary directory,
nnm-bak-<
, then replaces this directory with a
tar file using the same name as the temporary directory.TIMESTAMP
>
-?|-h|-help
Display command usage.
Suppose you want to save the NNMi configuration before discovering your network, but do not want to save the discovery results.
To do this, you might run a backup using the online
and config
options:
#./nnmbackup.ovpl –type online –scope config –target
/tmp/bak/config
Suppose you want to save the NNMi configuration, discovered topology, and event data without bringing the application down.
To do this, you might run a backup using the online
, events
, and
force
options:
#./nnmbackup.ovpl –type online –scope events –target
/tmp/bak/evt
Suppose you want to run a regularly scheduled backup. To do this you might perform a backup using the
offline
and full
options:
#./nnmbackup.ovpl –force –type offline –scope all –target
/tmp/bak/all