Sun Management Center 4.0 Installation and Configuration Guide

Sun Management Center Backup and Recovery

The es-backup command enables you to back up all base and add-on data in your database, and all of the configuration data in /var/opt/SUNWsymon/cfg. The es-restore command restores the database and configuration data from a previous backup.

Using es-backup

You should use es-backup to back up your database and configuration data as follows:

For more information on using the es-backup command to do online backups, see Database Backup and Recovery in Sun Management Center 3.6.1 User’s Guide.

The syntax of the es-backup command is as follows:

es-backup [ -h ] [ -c ] [-y] [ -d dir] [ -o ] [ -e ]

The following table describes the es-backup command parameters.

Table 9–1 es-backup Options

Option 

Modifying Options 

Description 

-c

 

Perform cold backup. 

-d

dir

Back up the database and configuration data to the directory dir.

-e

 

Report estimated backup size. 

-h

 

List the options for es-backup.

-o

 

Perform an online backup. 

-y

 

Perform a non-interactive backup. You will not be prompted to stop Sun Management Center processes, nor will you be prompted for a backup directory name. 


Note –

If you do not specify a backup directory using the --d option, all database and configuration data is backed up to the directory /var/opt/SUNWsymon/backup.


To minimize and prevent data loss, you must run es-backup on a routine basis to enable recovery of your most current data in the event of a system failure. You can create a cron entry for the es-backup -y script to run the script on a periodic basis. As part of the cron entry, you might also want to copy the contents of /var/opt/SUNWsymon/backup to an alternate directory.


Note –

By default, a non-interactive backup overwrites the contents of /var/opt/SUNWsymon/backup. If you have previously performed a non-interactive backup of Sun Management Center data, and you want to save the previous backup, copy the contents of the directory /var/opt/SUNWsymon/backup to another location before running a non-interactive backup.


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.

ProcedureTo Manually Back Up Sun Management Center Data to the Default Directory

  1. Log in as root on the Sun Management Center server machine.

  2. Stop all Sun Management Center processes.

    Type the command /opt/SUNWsymon/es-stop -A and press Return.

  3. Backup your Sun Management Center data.

    Type the command /opt/SUNWsymon/es-backup and press Return.

    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.

  4. Specify the backup directory.

    You are prompted for the directory path in which to store the backup. The default location /var/opt/SUNWsymon/backup is displayed.

    • To accept the default backup directory /var/opt/SUNWsymon/backup, press Return.

      If a prior backup has been performed using the default directory /var/opt/SUNWsymon/backup, you are asked whether to delete the old backups.

      • To keep the old backups, type n to exit the backup process, then copy /var/opt/SUNWsymon/backup to a different directory.

      • To overwrite the old backups, type y.

    • To specify a different backup directory, type the name of the directory and press Return.

      For example:


      # Enter full directory path to store the backup data files
         [/var/opt/SUNWsymon/backup]: /backup-set-1
      

      If the directory does not exist, you are asked whether you want to create the directory. Type y and press Return.

      es-backup stops all running processes, and then backs up the database and configuration data to the directory you specified. When the backup is completed, es-backup starts all Sun Management Center processes.

  5. Validate the backup.

    Type the command /opt/SUNWsymon/sbin/es-restore -c and press Return.

    You are prompted to enter the full directory path to the backup files. The default backup directory path /var/opt/SUNWsymon/backup is displayed.

    • If you chose the default backup directory /var/opt/SUNWsymon/backup, press Return.

    • If you specified a different backup directory, type the full path and name of the directory and press Return.

    es-restore validates the data in the backup directory. You are informed whether the backup data is valid.

    • If the backup is not valid, examine the backup log file /var/opt/SUNWsymon/install/backup_host-name.date and time string.process-id where:

      • host-name is the name of the server you used to create the backup

      • date and time string is the year, date, and time the backup was created

      • process-id is the process ID of the es-backup session that created the backup

    • If the backup is valid, copy the backup directory to a different directory for safe keeping.

    The es-backup log file is /var/opt/SUNWsymon/install/backup_host-name.date and time string.process-id where:

    • host-name is the name of the server you used to perform the backup

    • date and time string is the year, date, and time the backup was run

    • process-id is the process ID of the es-backup session

Using es-restore

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.

ProcedureTo Restore Sun Management Center Data Using the Default Backup Directory

  1. Log in as root on the Sun Management Center server machine.

  2. Stop all Sun Management Center processes.

    Type the command /opt/SUNWsymon/es-stop -A and press Return.

  3. 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.

  4. 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 data from the default backup directory /var/opt/SUNWsymon/backup, press Return.

    • If you are restoring Sun Management Center data 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 /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