The Sun Management Center database sometimes needs to backed up to prevent loss of data. For example, you must back up your database before you upgrade the hardware or the Operating System (OS).
You can back up the Sun Management Center database in one of the following ways:
Shut down the product and then do the backup.
Do the backup while the product is still running (online backup).
The online backup feature has the following advantages:
You can back up the database up to the current moment without stopping the product.
You can enable or disable ARCHIVELOG mode at any time.
Before using the online backup feature, it is recommended to do a cold backup first for contingency. In a cold backup, you shut down the product first and then do the backup.
The following procedure guides you the following tasks.
Running a cold backup for contingency.
Enabling ARCHIVELOGMODE, which shuts down Sun Management Center and sets up archiving.
Backing up the database online.
(Optional) Do a cold backup
Become superuser by typing:
% su - |
Type this command:
#/opt/SUNWsymon/sbin/es-backup
Where /opt is the directory in which Sun Management Center is installed.
Since the script will shut down Sun Management Center, you are prompted to confirm.
Type y and press Enter.
You are prompted for the full directory path to store the backup data files.
Press Enter to accept the default directory or type a new path.
The script creates the backup files and then restarts the product.
Enable ARCHIVELOGMODE
Become superuser by typing:
% su - |
Type this command:
#/opt/SUNWsymon/sbin/es-config -a enable
Where /opt is the directory in which Sun Management Center is installed.
You are prompted to confirm that you want to enable archiving.
Type y and press Enter.
Since the script will shut down Sun Management Center, you are prompted to confirm the shutdown.
Type y and press Enter.
The script shuts down the product and informs you that a cold backup is recommended. You are prompted to confirm that you want to set up the database in archivelogmode.
Type y and press Enter.
You are prompted for the full directory path to store the archivelog files.
Enter the full directory path to store the archivelog files, for example:
/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.
Type y and press Enter.
Run the online backup.
Type this command:
# /opt/SUNWsymon/sbin/es-backup -o
You are prompted for the full directory path to store the backup data files.
Press Enter to accept the default or type a different path, for example:
Enter the full directory path to store the backup data files |
[/var/opt/SUNWsymon/backup]: |
/var/opt/SUNWsymon/mybackup |
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.
The script restarts the product.
If you do not want archiving on, you can disable archiving.
To disable ARCHIVELOGMODE, type this command:
# /opt/SUNWsymon/sbin/es-config -a disable
The above command shuts down the Sun Management Center, removes the archive log directory, and restarts the product.