9 Replies Latest reply on Oct 4, 2017 8:45 PM by Carey Walker

    dataset export/import

      Is there a published way to accomplish ...


      - export/backup a dataset;

      - import a dataset;

      - (delete existing and) import a dataset as a way to restore it from a previous backup;

      - copy one dataset from another;

      - (use a combination of above as a mechanism to) move islands of data from one environment to other -- mainly in the context of staging/testing or possibly even as part of deployment of critical changes.


      BTW, when I say 'dataset' here -- it includes the data set record, as well as all the data in all (or, at least a given set of) classes & relationships. All of this as a self-contained logical unit. The key there is to ensure that the relationships still are to be maintained properly after combinations of the above tasks (for example, export out a data set from one environment and then restore  this exported content on to a different environment). So trivially altering or generating new instanceids won't work.


      Any thoughts, ideas, or pointers to previous work or proven ways that solve this issue -- are all greatly appreciated.




        • 1. dataset export/import

          there are 2 methods of moving CI data between environments


          • take a entire db backup and save it a dump / backup file. Restore the same db backup / dump file into another environment. But the versions (remedy binaries) in both environments should match. Since you want to preserve all the instance ids and recon ids, I would suggest you use this approach if you have a db administrator or sufficient db level knowledge.


          • use the command line utility cmdbdriver to export CI data for classes / datasets to a xml file. refer to the BMC Atrium CMDB Adminsitrator's guide. Import the CI data into another environment using cmdbdriver -> impdt command ->xml file


          cmdbdriver utility has the commands to clean up datasets (CIs in a datasets) along with the related CIs.There are commands to clean up residual / orphan relationship CIs if any.



          • 2. dataset export/import

            Thanks for the response.


            First option is no go for us, because what I am really looking for a way to copy/move dataset level isolated data between environments. Not as a backup/restore of entire DB.


            >>cmdbdriver utility has the commands to clean up datasets (CIs in a datasets) along with the related CIs.There are commands to clean up residual / orphan relationship CIs if any.<<


            Can you elaborate what these commands specifically are? Or any pointer to docs.


            Indeed I have gone the route of wrappinig cmdbdriver scripts that do export data from one, and, import into another. However the challenge is how do you get these new CIs & relationships in place on the target side without breaking the previously established relationships in the source dataset.



            • 3. Re: dataset export/import

              Another two options are to use the migrater tool. The new migrater tool (I am not sure what version this changed in) understands CMDB objects and can migrate the CIs from one system to another.


              If you a comfortable with Java,C/C++, or web services you can always query the objects using one of the CMDB APIs and then insert them into the destination.


              On both of these the key is to exoprt the CI objects first then the relationships.

              1 of 1 people found this helpful
              • 4. Re: dataset export/import
                Manish Patel

                Hi Appajee,

                .<< Can you elaborate what these commands specifically are? Or any pointer to docs

                You can refer CMDBDiag utility which does exactly what you’re looking.




                1 of 1 people found this helpful
                • 5. dataset export/import

                  Apologies, not cmdbdriver, but cmdbdiag utility can be used to clean up datasets and relationships. Login to cmdbdiag and you will get step by step instructions and menu choices.

                  1 of 1 people found this helpful
                  • 6. dataset export/import

                    #1 Export Data and Backup -


                    To Back your existing data you can use CMDB Driver Command - xexpdt


                    xexpdt - This will back up your entire data(CI's and Relationship) in chunk.


                    e.g. In below I have taken the data back for BMC.SAMPLE dataset from BMC_BaseElement Class. If you would like to export data for only few class then you can set the "Export instance data from all classes?" to F.


                    Please provide the file name as i have given Test1.XML(The file will create at CMDB Driver Location or you can specify absolute path). If you have very large kind of data then number of xml file gets generated at provided location.

                    Command: expdt
                    EXPORT DATA
                    Class Name
                       Namespace (): BMC.CORE
                       Class name (): BMC_BaseElement
                       Dataset ID (): BMC.SAMPLE
                    Qualification string:
                       Number of Attributes (0):
                    Number of sort attributes (0):
                    First Retrieve (0):
                    Maximum number of entries to retrieve (500):
                    Filename for exported data: test.xml

                       CMDBExportData  results
                    ReturnCode:  OK
                    Status List : 0 items

                    Command: xexpdt
                    XEXPORT DATA
                    Export instance data from all classes? (F): T
                    Dataset ID (): BMC.SAMPLE
                    Filename for exported data: test1.xml



                    # 2 Cleaning the data -


                    Use cmdbdiag (@ Location <<AtriumCore Home>>\cmdb\sdk64\bin) to cleanup the data.


                    e.g.  from the cmdbdiag you can choose the 2 option for cleaning the data and to clean dtaset for all datasets choos "y" as shown below -

                    Main Menu

                       1. Data Integrity Checker
                       2. CI and Relationship Correction Tool
                       3. Quit

                       Enter your choice --> 2

                    CI and Relationship Correction Tool Submenu

                       1. Reset Reconciliation Identities
                       2. Clean up Dataset
                       3. Correct Relationships
                       4. Delete Orphan Relationships
                       5. Remove Cardinality Violations
                       6. Clean up Classes
                       7. Fix Orphaned Weak members
                       8. Delete Orphaned Weak members
                       9. Main Menu

                       Enter your choice --> 2

                    CLEANING UP DATASET

                       All datasets [y, n] (n) : y

                    The following classes will be affected:


                    #3 Importing dataset -


                    impdt - use this command to import the data (shown below)


                    Command: impdt
                    IMPORT INSTANCE DATA
                    Handle duplicate Instance Ids:
                      (Error/New ID for Dup/Merge/New ID for All) (1-4) (1): 2
                    Filename containing import data: test1.xml_100_0

                       CMDBImportData  results
                    ReturnCode:  OK
                    Status List : 0 items
                    Total items Processed             :  23
                    Items Imported successfully       :  23
                    Items for which Import failed     :  0


                    provide the xml file name(we have already backed up the data by using xmpdt).

                    3 of 3 people found this helpful
                    • 7. Re: dataset export/import
                      Sumeet Verma

                      Hi All,


                      could someone please answer on my below requirements?


                      1. Is it possible to Backup\Export only few Classes (BMC.ComputerSystem) of my Golden Dataset and restore\Import those classes back to Golden dataset on the same environment?


                      2. Is it possible to take Export\Backup of Entire Golden dataset or of only particular Class (BMC.ComputerSystem) and Restore only particular CIs (example few windows servers) back to golden dataset?


                      if above are possible, where could i find all steps to do Export\Import and Backup\Restore.



                      • 8. Re: dataset export/import
                        Rahul Priyadarshy

                        Hi Sumeet,



                        Have a look at this Link- Creating a Copy reconciliation activity - BMC Atrium Core 8.1 - BMC Documentation


                        Creating a Copy reconciliation activity - BMC Atrium Core 8.1 - BMC Documentation



                        I can see we can use qualification set in Copy too - To Resrict only to few CI.





                        • 9. Re: dataset export/import
                          Carey Walker

                          Hi Sumeet


                          For your requirements, and also some of the others above, the recon. engine can help also.


                          So there are Copy Dataset jobs, which can have qualification sets attached, which will take data from BMC.ASSET to another dataset (call it BACKUP1). So you can define a job and a qualification set that says something like ClassiD='BMC_COMPUTERSYSTEM'. This will copy all Computer System CIs to the other dataset, effectively backing them up. You have quite a bit of other control (like whether to include all sub-classes of BMC_COMPUTERSYSTEM etc etc).


                          You can then do a copy job to get them back into BMC.ASSET and work out what to do when there are collisions with existing CIs as well.


                          Qualification sets as mentioned can be used at any stage to control what comes out and what goes back in. So you can qualify down to a CI Name if you want.