Exporting InterMapper database data


This topic provides instructions on creating an import source file that contains InterMapper database data to be used during a device import task.

Starting with version 4.3 of InterMapper, you can export the InterMapper data in XML format. You can use either the InterMapper GUI or command line interface to export data.

Both the export methods can be carried out on the computer hosting the InterMapper Console or any remote computer hosting the InterMapper Remote. The command line interface (CLI) is ideal for automating the export/import process by using the operating systems scheduling utility (that is, Microsoft Windows Scheduler or Linux cron).

Generating the source file by using the InterMapper Console or InterMapper Remote GUI

  1. Log on to InterMapper using an account that has file export privileges.

    Note

    If you are logging in to the InterMapper Console, you might not be prompted for a username and password.

  2. Select File > Export > Map Data.
  3. Set the following in the Export Map Data window:
    1. Leave the Table field set to devices.
    2. Click Add All to export all tables.
    3. Select XML for the Output Format.
      Select accordingly for whether you want to export data from all maps, this map, or only selected items. Export this map is the default.
  4. Click Export and specify the filename and location of the XML export file.

Generating the source file using the InterMapper Console CLI

Run the following command on the computer that hosts the InterMapper Console to export all device tables from all maps to an XML file:

java -jar InterMapper_Console.jar --host 127.0.0.1 --export "format=xml table=devices fields=*" > filename.xml

filename.xml is the path and file name of the resulting XML file.

Generating the source file using the InterMapper Remote CLI

Confirm the following requirements before running the InterMapper Remote command line export:

  • Ensure that the InterMapper Console is not blocking connections from the remote computer: In InterMapper Console select Edit > Server Settings. Then click Remote Server under Server Configuration. Add an entry for the Remote computer's IP address.
  • Ensure that the InterMapper Remote GUI is not currently running on the remote computer.
  • Be sure to use at least Java version 1.4 in the following step. You can check this by typing java -version.

Use the following command if running on a remote computer hosting InterMapper Remote to export all device tables from all maps to an XML file:

java -jar InterMapper_Remote.jar --host host --user username --pass password --export "format=xml table=devices fields=*" > filename.xml

  • host is the IP address or host name of the computer hosting the InterMapper Console
  • username and password correspond to an account that has file export privileges
  • filename.xml is the path and file name of the resulting XML file

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*