To restore your Sun Management Center database and configuration data, for example if your database has been corrupted due to a system failure, use the es-restore command.
The syntax of the es-restore command is as follows:
es-restore [-h] [-c] [ -d dir] [-y] [-f]The following table describes the es-restore command parameters.
Table 9–2 es-restore Options
Option |
Modifying Options |
Description |
---|---|---|
-c |
|
Verify the backup files only. Do not restore the data. |
-d |
dir |
Restore the data using the backup files located in the directory dir. |
-h |
|
List the options for es-restore. |
-f |
Force database schema recreation. |
|
-y |
Use default answer. |
The following procedure assumes that you installed Sun Management Center in the default directory /opt. If you did not install Sun Management Center in /opt, replace /opt with the name of the directory you specified.
Log in as root on the Sun Management Center server machine.
Stop all Sun Management Center processes.
Type the command /opt/SUNWsymon/es-stop -A and press Return.
Type the command /opt/SUNWsymon/sbin/es-restore.
If any Sun Management Center processes are still running, you are notified that Sun Management Center must be shut down.
You are asked whether you want to proceed. Type y and press Return.
Specify the backup directory.
You are prompted for the directory path to the backup files. The default location /var/opt/SUNWsymon/backup is displayed.
If you are restoring Sun Management Center from the default backup directory /var/opt/SUNWsymon/backup, press Return.
If you are restoring Sun Management Center from a different backup directory, type the name of the directory and press Return.
All Sun Management Center processes are stopped. es-restore validates the backup data in the specified directory.
If the backup data is corrupted, you are informed, and es-restore exits to the system prompt.
If you decide not to restore the Sun Management Center data from a different backup, and want to restart Sun Management Center, type the command /opt/SUNWsymon/sbin/es-start -A and press Return.
If the backup data is valid, es-restore restores the database and configuration data from the specified directory.
When the restore is completed, es-restore restarts all Sun Management Center processes.
The es-restore log file is /var/opt/SUNWsymon/install/restore_host-name.date and time string.process-id where:
host-name is the name of the server you used to perform the restore
date and time string is the year, date, and time the restore was run
process-id is the process ID of the es-restore session