Lieutenant
Lieutenant
125 views

How to Download template / polices from OMi in XML

Please guide me to  download Management Templates & Aspects in xml format

0 Likes
4 Replies
Micro Focus Expert
Micro Focus Expert

You need to add these resources to Content Pack and then you can export the CP to XML.
0 Likes
Lieutenant
Lieutenant

Please guide me as i am not very familiar with OMi

Tags (1)
0 Likes
Micro Focus Expert
Micro Focus Expert

Hello,

You can also use the CLIs "opr-config-tool" and "opr-template":

https://docs.microfocus.com/itom/Operations_Bridge_Manager:2020.10/Clioprconfigtool 
https://docs.microfocus.com/itom/Operations_Bridge_Manager:2020.10/Clioprtemplate 

Here two examples to get you started:

# opr-config-tool.sh -user admin -password ... -ud -type a -name "CPU Performance" -output /tmp/aspect.xml
# mkdir /tmp/poldir
# opr-template -user admin -password ... -download -type template -name Sys_CPUSpikeCheck -output /tmp/poldir -format xml

Regards,
Thierry.

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Admiral Admiral
Admiral

this script downloads all polices. but you need to create a rc_file for authentification. see opr-node -help for how to create rc_file.

I use this for backup purposes.

good luck

 

set -x
#env


WORKDIR=/opt/TYB/Policy_Download
RC_FILE=$WORKDIR/rc_file
DOWNDIR=$WORKDIR/configdownload
LIST=$WORKDIR/list_of_all_policies

# Flat true = all polices in one folder
# Flat false = for each policy one folder is created
FLAT=FALSE

# Allversion true = download all version of a policy
# Allversion false = download only latest version of a policy
ALLVERSION=FALSE

# download list of all policies
opr-template -rc_file $RC_FILE -list > $LIST

while read LINE ; do
{
POLNAME=`echo $LINE | cut -f2 -d \"`
DIRNAME=`echo $POLNAME | tr " " "_"`
if [ $FLAT = TRUE ]; then
DIRNAME=""
fi
if [ $ALLVERSION = TRUE ]; then
OA="-all"
fi
mkdir -p $DOWNDIR/$DIRNAME
opr-template -rc_file $RC_FILE -download -name "$POLNAME" $OA -output $DOWNDIR/$DIRNAME

}
done < $LIST

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.