Oracle's recommendation for an Enterprise Manager backup can be found in
"Enterprise Manager Cloud Control Advanced Installation and Configuration
Guide", chapter "Backing Up and Recovering Enterprise Manager".
Basically, the recommendation consists of (only) three steps:
· Software Library Backup
· Management Repository Backup
· Oracle Management Service Backup
· Exportconfig
· Software Homes
But we have a lot more important stuff within Enterprise Manager which
is worth to be backed up, haven't we? Monitoring Templates for example, Metric
Extensions or properties which were changed (either possibly or probably), …
But, where to get this information from and how to extract it from Enterprise
Manager's guts? Repository, emctl and emcli are the keywords – here's how to …:
Software Library Backup
… of course worth a frequent backup. IMHO the best way to get the latest
information about the current path is to query the repository database:
selectPut the result in a variable and issue something like this:
base_path
from EM_SWLIB_OMS_LOCATIONS_E
where name ='default_loc';
tar cvfz software_library.tar $<variableName>/*
Management Repository Backup
… as a DBA You know how to backup an oracle database. I'm sure …
Oracle Management Service Backup
… as oracle's manual states, useemctl exportconfig oms
And the additional stuff, I was talking about?
OMS Properties
Backup the OMS properties – even if You've never changed them – by issuing anemctl list propertiesRedirect the result to a file having a timestamp or a sequential number in its filename and You're save.
Monitoring Templates
To backup Monitoring Templates use this SQL, spool the output to a file and execute the file:select
'emcli export_template -name='''||template_name||''' -target_type='||target_type||' -output_file=$BACKUP_DIR/MT_'||template_name||'.xml'
from sysman.mgmt_templates
where is_public = 0
order by template_name ;
Metric Extensions
Developing Metric Extensions is a time consuming task – so backup the MEs frequently. It is that easy (spool and execute the spool file):select
'emcli export_metric_extension -file_name=''$BACKUP_DIR/'||name||'_V'||version||'.xml'' -target_type='||target_type||' -name='''||name||''' -version='||version
from SYSMAN.EM_MEXT_VERSIONS_E
order by name, version;
Incident Rulesets
Your Incident Rulesets are candidate to be backed up, too (spool and execute):select
'emcli export_incident_rule_set -rule_set_name='||ruleset_name||' -rule_set_owner='||owner||' -export_file="$BACKUP_DIR"'
from EM_RULE_SETS
where owner not in ('SYSMAN', '<SYSTEM>')
order by owner, ruleset_name;
Information Publisher Reports
Did You write Information Publisher Reports? Backup them (redirect to a file and execute)!:emcli get_reports | sed "s/, / /g" | awk 'BEGIN{ FS=","}{x=$1; gsub(/ |-|=|:|\/|\(|\)/, "",x); print "emcli export_report -title="$1" -owner="$2" -output_file=${BACKUP_DIR}/REP_"x".xml" }'
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.