Sun Update Connection - Enterprise 1.0 Administration Guide

Chapter 8 Backup and Restore

The backup and restore tools allow you to backup the system dependency server data files and to restore them at a later date. It provides a disaster recovery solution, for the possibility of the system dependency server system breaking down.

The following topics are covered:

Server Backup and Restore

Schedule a daily run of the backup script, and save the resulting archive in a secure magnetic media external from the SDS system. A faithful backup procedure allows for full disaster recovery.

Backing Up the System Dependency Server

This task explains what happens when you run the backup script. The backup.sh script is in the installation directory created when you first installed the system dependency server: /usr/local/uce/install.

ProcedureTo Back Up the System Dependency Server

  1. Log in to the system as superuser.

  2. Change to the installation directory.

    # cd /usr/local/uce/install

  3. Run the backup script.

    # ./backup.sh

Backup Archive

The following steps are performed automatically:

  1. Sun Update Connection – Enterprise applications are stopped.

  2. The backup script verifies that the local system is the system dependency server.

  3. The data in the following directories and files are saved under backup names:

    • /usr/local/uce/server/public/* - Universal rules and components

    • /usr/local/uce/server/private/* - Local rules and components

    • /usr/local/uce/engine/*/bin - Settings files and encryption keys

    • /usr/local/uce/install/* - Application installers, restore and support scripts

  4. The databases are backed up and the backup files are stored in a tar file. The file name includes the year, month, day, hour, and minute that the backup was created./usr/local/uce_backup/backup-<yyyy-mm-dd-hh-mm>.tar.gz

  5. Sun Update Connection – Enterprise applications are restarted and backup exits.


Example 8–1 Backup Archive File

The following backup archive contains the contains local and universal knowledge base and console data for June 25, 2003, 1:07 p.m.

/usr/local/uce_backup/backup-2003-06-25-13-07.tar.gz


Restoring the System Dependency Server

This task explains what happens when you run the restore script. The restore.sh script is in the /usr/local/uce/install directory.


Caution – Caution –

Once you select a file to restore, all current Sun Update Connection – Enterprise data is overwritten. Before restoring an older version, you should perform the backup procedure for the current data.


ProcedureTo Restore the System Dependency Server

  1. Log in to the system as superuser.

  2. Change to the installation directory.

    # cd /usr/local/uce/install

  3. Run the restore script with a pointer to the desired backup archive.


    # ./restore.sh /<fullpath>/<backedUpServer>.tar.gz
    

    The following steps are done automatically, but require your confirmation before continuing:

    • Sun Update Connection – Enterprise applications are stopped.

    • The selected file is unpacked and the data is restored.

    • Sun Update Connection – Enterprise applications are restarted and restore exits.

Shared Resources Server Backup and Restore

If managed hosts use shared resources, perform the following tasks in addition to the previous procedures. Unless otherwise stated, do the tasks on the system dependency server system.

ProcedureTo Back Up Files for Shared Resources

  1. Change to the install directory.

    # cd /usr/local/uce/install

  2. Create the console subdirectory.

    mkdir console

  3. Create the agent subdirectory.

    mkdir agent

  4. From the console system, copy the console’s .uce.rc file to the new console directory on the system dependency server system.

    cp ~/.uce_console/.uce.rc /usr/local/uce/install/console

  5. From a managed host, copy an agent’s .uce.rc file to the new agent directory on the system dependency server.

    cp /opt/uce/agent/bin/.uce.rc /usr/local/uce/install/agent

  6. Run the backup script.

    ./backup.sh

    The .uce.rc files of the consoles and agents contain the parameter that enables shared resources support. These parameters are included in the backup.

ProcedureTo Restore Shared Resource Files

  1. Execute the restore script.


    # ./restore.sh
    
  2. Change to the installation directory.


    # cd /usr/local/uce/install
    
  3. If the agents or consoles were changed after backup, reinstall them using the new console-date.tar.gz and agent-date.tar.gz files. Do not open the console or start agents.

  4. Overwrite the newly installed .uce.rc file of the console with the file that was backed up.

    cp /usr/local/uce/install/console/.uce.rc ~/.uce_console/.uce.rc

  5. Stop the agents. On each managed host.


    # /etc/init.d/uce_agent stop
    
  6. Overwrite the newly installed .uce.rc file of the agent on each managed host: /opt/uce/agent/bin/.uce.rc with the file backed up on the SDS: /usr/local/uce/install/agent/.uce.rc

  7. On each managed host, start the agents.


    # /etc/init.d/uce_agent start
    

    All affected systems are restored to their exact condition of the time of the backup.

Disaster Recovery

Follow the steps of this procedure to use the backup and restore tools to recover from a complete failure of the system dependency server system.

Recovering the system dependency server

This task is most effective if you have made daily backups and stored them externally.

ProcedureTo Recover From a System Dependency Server Disaster

  1. Perform a daily backup as described previously.

  2. Select a backup server to replace the broken server. Change the hostname of the new server to match the name of the faulty system.

  3. Change DNS to resolve the hostname to the new server’s IP address.

  4. Install the system dependency server on the new system.

  5. Restore the last backup archive by using the restore.sh script.

  6. Start the console.

  7. Manually apply all unsaved changes made to the system dependency server after the last backup.

Troubleshooting