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:
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.
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.
Log in to the system as superuser.
Change to the installation directory.
# cd /usr/local/uce/install
Run the backup script.
# ./backup.sh
The following steps are performed automatically:
Sun Update Connection – Enterprise applications are stopped.
The backup script verifies that the local system is the system dependency server.
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
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
Sun Update Connection – Enterprise applications are restarted and backup exits.
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
This task explains what happens when you run the restore script. The restore.sh script is in the /usr/local/uce/install directory.
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.
Log in to the system as superuser.
Change to the installation directory.
# cd /usr/local/uce/install
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.
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.
Change to the install directory.
# cd /usr/local/uce/install
Create the console subdirectory.
mkdir console
Create the agent subdirectory.
mkdir agent
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
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
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.
Execute the restore script.
# ./restore.sh |
Change to the installation directory.
# cd /usr/local/uce/install |
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.
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
Stop the agents. On each managed host.
# /etc/init.d/uce_agent stop |
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
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.
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.
This task is most effective if you have made daily backups and stored them externally.
Perform a daily backup as described previously.
Select a backup server to replace the broken server. Change the hostname of the new server to match the name of the faulty system.
Change DNS to resolve the hostname to the new server’s IP address.
Install the system dependency server on the new system.
Restore the last backup archive by using the restore.sh script.
Start the console.
Manually apply all unsaved changes made to the system dependency server after the last backup.
If the script seems to take some time before starting, Sun Update Connection – Enterprise is busy. The backup or restore tool waits for the procedure to be completed before continuing.
If the ezInstaller command is run at any time after backup and before restore, you must reinstall the agents and console from the /usr/local/aduva/install directory. This is to ensure that the system dependency server, the agents, and the console all have the same encryption keys. Without the same keys, communication between the engine, console and agents is not possible.
If an error appears that the database dump is empty and then the script exits, contact technical support.
If the backup script exits without backing up, the local system is not the system dependency server. This script backs up only the system dependency server, not agents or consoles.