Database Reference
In-Depth Information
Section 3: Essential Server-Management Scripts
The shell scripts in this section contain various uses of EM CLI, including backing up all configuration files on your
OMS server and then controlling the amount of space consumed by OMS log files.
Oracle has been very good about providing these services for files they deem critical. These scripts take care of all
the rest.
Configuration Backup Script
OEM backs up key OMS configuration files to the repository database. This script performs a file-level backup for
those files (and several others). One should use the same shared filesystem used by the Software Library as the site of
those backups.
This script only creates new backups when it determines that the source file has different content than its
backup copy. If a difference exists, the old backup is renamed with a .old suffix. This provides you with another
troubleshooting tool that can be particularly helpful after OMS patching. You can use file creation dates to determine
which configuration files changed and then run a quick diff command to find out how they changed:
Sample Script: backup_oms_configs.ksh
#!/bin/ksh
#===============================================================================
# Script name : backup_oms_configs.ksh
# Calling args : None
# Purpose : Backup key OMS configuration files
#===============================================================================
# Independent variables
#===============================================================================
export OMS_HOME=<Set your OMS home directory here>
export BACKUP_DIR=<Set backup destination directory here>
#===============================================================================
# Functions
#===============================================================================
function DashedBreak {
echo "\n--------------------------------------------------------------------------------\n"
}
function PrepareBackupDir {
SOURCE_DIR=${OMS_HOME}/${DIRNAME}
TARGET_DIR=${BACKUP_DIR}/${DIRNAME}
STAGE_DIR=${TARGET_DIR}/staging
if [ -d ${TARGET_DIR} ]; then
echo "\n\nFound directory ${TARGET_DIR}\n\n"
else
echo "\n\nCreating directory ${TARGET_DIR}\n\n"
mkdir -p ${TARGET_DIR}
 
Search WWH ::




Custom Search