How do I export CMDB classes? How do I import CMDB classes?

Version 2
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    BMC Atrium CMDB Suite


    BMC Atrium CMDB Suite


       What is the best way to migrate CMDB classes?  What is osdriver?  



    Legacy ID:KA337360


    You must import and export class and attribute definitions using the CMDB API, which can be done via osdriver.  Osdriver is a commandline AR System Object Store API driver, very similar in behavior and purpose as driver, for the ARS API.  Osdriver uses the CMDB API to manage classes and attributes, manage instance IDs, synchronize meta-data to ARS forms, and import and export the meta-data and instance IDs.  You should not use the Remedy Administrator tool to export/import CMDB classes because the admin tool does not use the CMDB API and thus doesn't know anything about the meta-data, which is crucial to the CMDB.   Without the meta-data, CMDB API clients will not know about the class - you would only have forms that could be accessed only from AR System clients.


    Also, without the meta-data, you would not be able to create relationships involving the data. That is, in order to create a relationship between any two instances, you must at least have class information about the instances on either end of the relationship.


    To use the osdriver program, locate the executable under Program Files\AR System Applications\<server name>\Remedy Object Store\bin, and then double-click the executable to run it.  Specify the login parameters with the log command, then initialize an API session with the init command.  Then type the abbreviation of the function call at the command line and provide the appropriate input parameter values.  (use the help command (h or ?) to display the osdriver commands.


    Below is osdriver session output when running through the process of exporting the BMC_ComputerSystem class, and the importing it.   When you export a class, it creates several XML files in the directory specified, and these are used to import them.  In the example below, changes were made to the ComputerSystem class, it was exported, the database was restored, and then the class was imported from the same directory, to restore the class customizations.  In practice, the procedure will typically be used to migrate class changes from one server to a different server.


    Note: Be careful to use the same version of osdriver to export and import classes.


    Command: init




    AROSInitialization results


    ReturnCode: OK


    Status List : 0 items


    Command: log


    Control record:


    Authentication string () :


    User name () : Demo


    Password () :


    Language () :


    TimeZone () :


    Server () : localhost


    Command: exp




    Export Item List:


    Number of export items (0): 1


    Class Name


    Namespace (): BMC


    Class name (): BMC_ComputerSystem


    Metadata, Instance data (1-2): (1)1


    Export options -- class only, super classes, subclasses (1, 2, 4) (1): 1


    Directory for exported data: C:\Temp


    AROSExport results


    ReturnCode: OK




    Command: imp




    Import Item List:


    Number of import items (0): 1


    Class Name


    Namespace (): BMC


    Class name (): BMC_ComputerSystem


    Metadata, Instance data (1-2): (1)1


    directoryPath containing import data: C:\Temp




    *************** SORTED CLASSES TO BE SYNCED ****************






    Syncing class: BMC:BMC_ComputerSystem




    ARImport results


    ReturnCode: OK


    Status List : 0 items




    Article Number:


    Article Type:


      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles