Sun Management Center 3.6.1 User's Guide

Database Backup and Recovery

Your Sun Management Center database sometimes needs to be backed up to prevent loss of data. For example, you should back up your database before you upgrade the hardware or the operating system. You can back up the Sun Management Center database in one of these ways:

Cold Backup

In a cold backup, you shut down the product first and then perform the backup. Before setting up the online backup feature, perform a cold backup as a contingency.

ProcedurePerforming the Cold Backup

  1. Become superuser.


    # /opt/SUNWsymon/sbin/es-backup
    

    Because the script shuts down Sun Management Center, you are prompted to confirm.

  2. Type y and press Enter.

    You are prompted for the full directory path to store the backup data files.

  3. Press Enter to accept the default directory or type a new path.

    The script creates the backup files and then restarts the product.

Online Backup

This procedure guides you through these tasks:

Using online backup has these advantages. You can back up the database up to the current moment without stopping the product. You can disable or enable ARCHIVELOG mode at any time.


Note –

Online backup does not shut down the product.


ProcedurePerforming the Online Backup

  1. (Optional) Perform a cold backup. See Performing the Cold Backup.

  2. Enable ARCHIVELOGMODE.

    1. Become superuser.


      # /opt/SUNWsymon/sbin/es-config -a enable
      

      You are prompted to confirm that you want to enable archiving.

    2. Type y and press Enter.

      Because the script will shut down Sun Management Center, you are prompted to confirm.

    3. Type y and press Enter.

      The script shuts down the product and recommends a cold backup. You are prompted to confirm that you want to set up the database in ARCHIVELOGMODE.

    4. Type y and press Enter.

      You are prompted for the full directory path to store the archive log files.

    5. Type the full path, for example:


      Enter full directory path to store the archive log files: 

      /var/opt/SUNWsymon/archives
      

      The script creates the directory if it does not exist and enables ARCHIVELOGMODE. You are prompted to start the agent and server components.

    6. Type y and press Enter.

  3. Run the online backup.

    1. Type this command:


      # /opt/SUNWsymon/sbin/es-backup -o
      

      You are prompted for the full directory path to store the backup data files.

    2. Press Enter to accept the default or type a different path, for example:


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

      /var/opt/SUNWsymon/mybackup
      

      Note –

      If you accept the default directory and later plan to uninstall the product, your backup files might be deleted. Before uninstalling the product, move the backup files to another location. Alternatively, use a different path for your backup files.


ProcedureDisabling ARCHIVELOGMODE

If you do not want archiving on, you can disable archiving.

    To disable ARCHIVELOGMODE, type this command:


    # /opt/SUNWsymon/sbin/es-config -a disable
    

    Sun Management Center is shut down, the archive log files are removed, and the product is restarted.

ProcedureShutting Down the Product Before Backing Up

    If you want to shut down the product before doing a backup, you have two options:

    • To run the backup interactively, type this command:


      # /opt/SUNWsymon/sbin/es-backup
      
    • To run the backup in silent mode and use default answers to the script's questions, type this command:


      # /opt/SUNWsymon/sbin/es-backup -y
      

      The database files are saved in the directory /var/opt/SUNWsymon/backup.

    If you need to periodically run the es-backup script, you can set a cron program for the script to be run on a routine basis. In this case, use the -y option for the es-backup script so that no interaction is needed.


    Note –

    Both scripts shut down the Sun Management Center processes before starting the restore or backup. These scripts also restart the processes once the recovery or backup has been completed.


ProcedureRecovering the Database

    If your Sun Management Center database has been inadvertently corrupted due to a system failure, run the following interactive script as superuser to restore your database:


    # /opt/SUNWsymon/sbin/es-restore
    

    For example, you might want to follow this process if the system failure is due to a file system problem.