Oracle Enterprise Manager Ops Center has capabilities that can be used to recover data and resume functions if the Enterprise Controller system fails.
The following features and topics are covered in this chapter:
Oracle Enterprise Manager Ops Center has several tools that can be used for disaster recovery. These tools let you preserve Oracle Enterprise Manager Ops Center data and functionality if the Enterprise Controller or Proxy Controller systems fail.
The ecadm backup
and ecadm restore
commands back up and restore the Enterprise Controller. They also back up and restore the colocated Proxy Controller unless otherwise specified. The proxyadm backup
and proxyadm restore
commands back up and restore remote Proxy Controllers.
The ecadm backup
command creates a tar
file that contains all of the Oracle Enterprise Manager Ops Center information stored by the Enterprise Controller, including asset data, administration data, job history, and the database password, but not including software and storage library contents. The proxyadm backup
command creates a tar
file that contains all of the Oracle Enterprise Manager Ops Center information stored by the Proxy Controller, including asset data. You can specify the name and location of the backup file and the log file for each command.
Run the ecadm backup
and proxyadm backup
commands regularly and save the backup files on a separate system.
If the Enterprise Controller system fails, you can use the ecadm restore
command and the backup file to restore the Enterprise Controller to its previous state on the original system or on a new system. The new Enterprise Controller system must have the same operating system and architecture, and must have the same version of Oracle Enterprise Manager Ops Center installed as was used when the backup was made. The ecadm restore
command accepts the name of the backup file as input, and restores the Enterprise Controller to the state it had at the time of the backup. If the new Enterprise Controller system has a new IP address, you must manually update the Proxy Controllers to use the new IP address.
If a remote Proxy Controller system fails, you can use the proxyadm restore
command and the backup file to restore the Proxy Controller. The proxyadm restore
command accepts the name of the backup file as input, and restores the Proxy Controller to the state it had at the time of the backup.
Some of the procedures described in this section use the ecadm
and proxyadm
commands. See Appendix A, "Command Line Administration" for more information about these commands.
On Oracle Solaris systems, these commands are in the /opt/SUNWxvmoc/bin/
directory.
On Linux systems, these commands are in the /opt/sun/xvmoc/bin/
directory.
You can use the ecadm
command to back up and restore an Enterprise Controller.
You can create a backup for the Enterprise Controller using the ecadm
command with the backup
subcommand.
By default, the server data is saved in a backup file in the /var/tmp
directory with a file name that includes a date and time stamp. You can define the file name and location during the backup, as shown in the example below.
If you are using an embedded database, the backup file includes the product schema from the embedded database. This database schema includes all logical structures and data related to Oracle Enterprise Manager Ops Center. If you are using a customer-managed database, you can back up the database schema using the --remotedb
option, or you can use the existing backup and recover processes implemented by your database administrator.
From the command line, log in to the Enterprise Controller system.
Use the ecadm
command with the backup
subcommand to back up the Enterprise Controller.
The following options may be used with the ecadm
command:
-o|--output <backup file>: Specify the file in which the backup archive is generated. Do not specify a path inside the /opt/*xvm*
directories. The default output file is /var/tmp/sat-backup-<date>-<time>.tar
.
-c|--configdir <dir>: Specify an alternate backup configuration directory.
-l|--logfile <logfile>: Save output from command in <logfile>. Log files are stored in the /var/opt/sun/xvm/logs/
directory.
-d|--description <description string>: Embed the <description string> as the description of the backup archive.
-r|--remotedb: If the Enterprise Controller uses a customer-managed database, export the database schema to a .dmp
file in the Oracle Enterprise Manager Ops Center dump directory on the database server. This directory is /var/tmp/ocdumpdir
in the examples used in the installation documentation, but any directory can be specified as the dump directory during installation and configuration. The .dmp
file lets the restore operation restore the database schema. This option only backs up the Oracle Enterprise Manager Ops Center database schema; other schemas and data are not included.
-t|--tag <tag>: Embed <tag> as a single-word tag in the backup archive.
-T|--tempdir <dir>: Specify the temporary staging directory location.
-v|--verbose: Increase the verbosity level. This option may be repeated.
For example:
ecadm backup -o /var/backup/EC-17December.tar ecadm: using logFile = /var/opt/sun/xvm/logs/sat-backup-2012-12-17-16:21:12.log ecadm: *** PreBackup Phase ecadm: *** Backup Phase ecadm: *** PostBackup Phase ecadm: *** Backup complete ecadm: *** Output in /var/backup/EC-12December.tar ecadm: *** Log in /var/opt/sun/xvm/logs/sat-backup-2012-12-17-16:21:12.log
Copy the backup file to a separate system.
You can use a backup file to restore the state of the Enterprise Controller to the state it had at the time of the backup.
This procedure restores the data from the backup file, which is the archive created by the ecadm backup
operation.
If you are using an embedded database, the restore process restores the product schema from the embedded database. If you are using a customer-managed database, you can use the --remotedb
option to restore the product schema on the customer-managed database, or leave this option off to make no changes to the database.
Prepare the Enterprise Controller system.
If you are restoring the backup on a new system, then the new system must have the same architecture and operating system as the old system. It is recommended that the operating system versions be identical, including updates and SRUs. The new system's host name and Enterprise Controller software version must also match those of the backed up system.
If you are restoring the backup on the same system, but the software has become corrupt or an upgrade failed, uninstall the Enterprise Controller software.
Run the install
script with the -e
and -k
options. The -e
option uninstalls the Enterprise Controller and co-located Proxy Controller, and the -k
option preserves the Oracle Configuration Manager software. For example:
# cd /var/tmp/OC/xvmoc_full_bundle # install -e -k
If you are restoring the backup on the same system, and the software is functioning normally, unconfigure the Enterprise Controller.
Install the Enterprise Controller if it has not been installed, but do not configure the Enterprise Controller, as the ecadm restore
command restores your configuration settings.
Oracle Solaris OS: See the Oracle Enterprise Manager Ops Center Installation Guide for Oracle Solaris Operating System.
Linux OS: See the Oracle Enterprise Manager Ops Center Installation Guide for Linux Operating Systems.
Note:
If you are using a customer-managed database which is still functioning, the Enterprise Controller installation procedure indicates several steps that you must skip and an additional option that you must use to avoid overwriting your existing database schema.Upgrade the Enterprise Controller to the same version that was running when the backup was made, if it is not already running that version. Perform this upgrade from the command line.
Run the ecadm
command with the restore
subcommand and the -i <backup directory location and file name>
option.
The following options may be used with the ecadm
command:
-i|--input <backup file>: (Required) Specify the location of the backup file.
-c|--configdir <dir>: Specify an alternate restore configuration directory.
-l|--logfile <logfile>: Save output from command in <logfile>. Log files are stored in the /var/opt/sun/xvm/logs/
directory.
-r|--remotedb: If the Enterprise Controller uses a customer-managed database, this option restores the product schema on that database. If you are restoring on a new database system, copy the .dmp
file that corresponds with your backup file from the Oracle Enterprise Manager Ops Center dump directory to the new database system and verify that it is owned by the oracle user on the new system.
-e|--echa: If the Enterprise Controller is configured in HA mode, this option indicates that the colocated Proxy Controller should not be restored.
-T|--tempdir <dir>: Specify the temporary staging directory location.
-v|--verbose: Increase verbosity level (may be repeated)
For example:
ecadm restore -i /var/backup/EC-17December.tar ecadm: using logFile = /var/opt/sun/xvm/logs/sat-restore-2012-12-17-21:37:22.log ecadm: *** PreRestore Phase ecadm: *** Restore Phase ecadm: *** PostRestore Phase ecadm: *** Log in /var/opt/sun/xvm/logs/sat-restore-2012-12-17-21:37:22.log
For an Enterprise Controller with a co-located Proxy Controller, check the Proxy Controller's status using the proxyadm
command with the status
subcommand. If the Proxy Controller is stopped, restart it using the proxyadm
command with the start
subcommand and the -w
option.
# proxyadm status offline # proxyadm start -w proxyadm: Starting Proxy Controller with SMF... proxyadm: Proxy Controller services have started #
If you restored the Enterprise Controller on a new system, reconfigure each remote Proxy Controller to use the new Enterprise Controller.
As root, log in to the Proxy Controller.
Unconfigure the Proxy Controller using the proxyadm
command with the unconfigure
subcommand and the -k
option. For example:
# proxyadm unconfigure -k
Reconfigure the Proxy Controller using the proxyadm
command with the configure
subcommand and the -s <Enterprise Controller hostname>
, -u <Enterprise Controller admin user name>
, and -p <Enterprise Controller password file name>
options. For example:
# proxyadm configure -s <new hostname> -u root -p <passwordfilename>
Restart the Proxy Controller using the proxyadm
command with the start
subcommand and the -w
option. For example:
# proxyadm start -w
Note:
After restoring the Enterprise Controller, the asset details might take several minutes to display completely in the user interface.Example: Restoring an Enterprise Controller With an Embedded Database
In this example, the ecadm restore
command includes options to set the restore in verbose mode (-v), and to create a restore log (-l) for debugging purposes. The input (-i) option specifies the backup file location.
# /opt/SUNWxvmoc/bin/ecadm restore -v -i /var/tmp/OC/server1/EC-17December.tar -l logfile-restore-15January.log
Example: Restoring an Enterprise Controller With a Customer-Managed Database
In this example, the ecadm restore
command includes the (-r) option to restore the database schema on a customer-managed database. The input (-i) option specifies the backup file location.
# /opt/SUNWxvmoc/bin/ecadm restore -i /var/tmp/OC/server1/EC-17December.tar -r
Example: Restoring an Enterprise Controller With a Customer-Managed Database Without Restoring the Database Schema
In this example, the ecadm restore
command includes options to set the restore in verbose mode (-v), and to create a restore log (-l) for debugging purposes. The input (-i) option specifies the backup file location. The (-r) option is not included.
# /opt/SUNWxvmoc/bin/ecadm restore -v -i /var/tmp/OC/server1/EC-17December.tar -l logfile-restore-15January.log
You can use the proxyadm
command to back up and restore a remote Proxy Controller.
The Proxy Controller backup file includes asset data, but does not include the contents of the /var/opt/sun/xvm/images/os
directory. You must back up images stored in this directory separately.
You can create a backup for a remote Proxy Controller using the proxyadm
command with the backup
subcommand. If you are using a co-located Proxy Controller, it is backed up by the ecadm backup
operation, and no additional backup is needed.
By default, the server data is saved in a backup file in the /var/tmp
directory with a file name that includes a date and time stamp. You can define the file name and location during the backup, as shown in the example below.
From the command line, log in to the Proxy Controller system.
Use the proxyadm
command with the backup
subcommand to back up the Proxy Controller.
The following options may be used with the proxyadm
command:
-o|--output <backup file>: Specify the file in which the backup archive is generated. Do not specify a path inside the /opt/*xvm*
directories. The default output file is /var/tmp/proxy-backup-<date>-<time>.tar
.
-c|--configdir <dir>: Specify an alternate backup configuration directory.
-l|--logfile <logfile>: Save output from command in <logfile>. Log files are stored in the /var/opt/sun/xvm/logs/
directory.
-d|--description <description string>: Embed the <description string> as the description of the backup archive.
-t|--tag <tag>: Embed <tag> as a single-word tag in the backup archive.
-T|--tempdir <dir>: Specify the temporary staging directory location.
-v|--verbose: Increase the verbosity level. This option may be repeated.
For example:
proxyadm backup -o /var/backup/PC-B_Sept14.tar
Copy the backup file to a separate system.
You can use a backup file to restore the state of a Proxy Controller to the state it had at the time of the backup.
This procedure restores the data from the backup file, which is the archive created by the proxyadm backup
operation.
Install the Proxy Controller if it has not been installed.
Oracle Solaris OS: See the Oracle Enterprise Manager Ops Center Installation Guide for Oracle Solaris Operating System.
Linux OS: See the Oracle Enterprise Manager Ops Center Installation Guide for Linux Operating Systems.
Upgrade the Proxy Controller to the same version that was running when the backup was made, if it is not already running that version. Perform this upgrade from the command line.
Run the proxyadm
command with the restore
subcommand and the -i <backup directory location and file name>
option.
The following options may be used with the proxyadm
command:
-i|--input <backup file>: (Required) Specify the location of the backup file.
-c|--configdir <dir>: Specify an alternate restore configuration directory.
-l|--logfile <logfile>: Save output from command in <logfile>. Log files are stored in the /var/opt/sun/xvm/logs/
directory.
-T|--tempdir <dir>: Specify the temporary staging directory location.
-v|--verbose: Increase verbosity level (may be repeated)
For example:
proxyadm restore -i /var/backup/PC-B_Sept14.tar
Stop the Proxy Controller by running the proxyadm
command with the stop
subcommand and the -w
option.
For example:
proxyadm stop -w
Start the Proxy Controller by running the proxyadm
command with the start
subcommand and the -w
option.
For example:
proxyadm start -w