TNPM/resmgr Official

From neil.tappsville.com
Jump to navigationJump to search

How to export metadata objects using 'resmgr'

Technote (FAQ)

This document applies only to the following language version(s) 
Which are the right 'resmgr' commands that I should use to export the 'metadata' objects for backup or platform migration purposes?

Answer

To properly export all the relevant 'metadata' Proviso objects, such as 'requests', 'calendars', 'reports' etc..., for backup or platform migration purposes, we must use the right columns and tables. These are the recommended ones 
# export all sub-element properties definition (not the value)
$PVMHOME/bin/resmgr -export frm -colNames "dbIndex name invariant comment" -filter "type(property)" -file Properties.rmg
  1. export element properties definition (with default value)
$PVMHOME/bin/resmgr -export propertyE -colNames "dbIndex name type invariant dataType defValue" -file eProperties.rmg
  1. export sub-element properties definition (with default value)
$PVMHOME/bin/resmgr -export propertySE -colNames "dbIndex name type invariant dataType defValue" -file seProperties.rmg
  1. export Calendar
$PVMHOME/bin/resmgr -export cal -colNames "dbIndex name period state origin user date" -filter "dbIndex(>='10000')"
-order "cal.name" -file calendar.rmg
  1. export element (with attached properties)
$PVMHOME/bin/resmgr -export elt -colNames "dbIndex name profil collector state type encl.name encl.oid eprp.name
eprp.value" -file element.rmg
  1. export SNMP community and port information
$PVMHOME/bin/resmgr -export elt -colNames "scf.version scf.type scf.ipaddress scf.wcommunity scf.timeout scf.retries
scf.port" -file snmp_conf.rmg
  1. export sub-element and their properties
$PVMHOME/bin/resmgr -export se -colNames "dbIndex elt.profil elt.name se.name se.instance se.label fam.name invariant
state seprp.name seprp.value" -file subelement.rmg
  1. export groups and their sub-elements
$PVMHOME/bin/resmgr -export segp -colNames "dbIndex npath se.name" -filter "type(generated)" -file segp_resource.rmg
  1. export only group
$PVMHOME/bin/resmgr -export segp -colNames "dbIndex npath cond type state rule " -filter "type(generated)" -file segp_name.rmg
  1. export the rules linked to the noc reporting group
$PVMHOME/bin/resmgr -export segp -colNames "dbIndex npath cond type state rule" -filter "type(!='generated')" -file Rules.rmg
  1. export the formulas
$PVMHOME/bin/resmgr -export fgp -colNames " frm.dbIndex npath frm.name frm.data frm.exprType frm.type frm.comment
frm.dataType frm.date frm.state" -file formula.rmg
  1. export the formula mibs associatoin
$PVMHOME/bin/resmgr -export fgp -colNames "frm.dbIndex frm.name frm.mibPath frm.mibOrigin" -file mib_formula.rmg
  1. export the requests
$PVMHOME/bin/resmgr -export segpreq -colNames "fgp.nName segp.npath ttype status storage period" -file Requests.rmg
  1. export the inventory profiles
$PVMHOME/bin/resmgr -export ogp -colNames "npath opt.name opt.instance opt.value" -file inventoryprofil.rmg
  1. export the thresholds
$PVMHOME/bin/resmgr -export thrdv -colNames "idxMetric idxGroup idxResource dteDate thrStat mode thrCalc brstWrnngLevel
brstWrnngTime brstCrtclLevel brstCrtclTime brstGenEvent prdWrnngLevel prdWrnngTime prdCrtclLevel prdCrtclTime prdGenEvent
prdPeriod" -file Threshold.rmg
  1. export the report styles
$PVMHOME/bin/resmgr -export appS -colNames "dbIndex name type comment definition" -file [[Report Style]].rmg
  1. export the report definition
$PVMHOME/bin/resmgr -export app -colNames "dbIndex name comment url type data" -sepRec "<E>" -file Report.rmg
  1. export the report group
$PVMHOME/bin/resmgr -export agp -colNames "dbIndex npath app.name" -file [[Report Group]].rmg
  1. export the report styles group
$PVMHOME/bin/resmgr -export agp -colNames "dbIndex npath appS.name" -file [[Report StyleGroup]].rmg
  1. export the report deployment link
$PVMHOME/bin/resmgr -export segp -colNames "npath type app.name" -file [[Link Report]].rmg
  1. export the report users
$PVMHOME/bin/resmgr -export segp -colNames "rusr.name npath" -file web_user.rmg
  1. export the report user properties
$PVMHOME/bin/resmgr -export rusr -colNames "rusr.name ruprp.name ruprp.value" -file web''user''properties.rmg
  1. export the report user group
$PVMHOME/bin/resmgr -export rugp -colNames "npath rusr.name" -file web''user''group.rmg