Export-Import Tool
- 1 Introduction
- 2 Use
- 2.1 Export
- 2.2 Compare Schema
- 2.3 Import
Introduction
In this document, we will see how to export the configuration of the platform in an environment.
This functionality is mainly focused on deployments of Onesait Platform instances and the migration of configuration between different instances.
The configuration data include ontologies, users, devices, etc. With this functionality, an administrator will be able to export those data and to import them to a different Onesait Platform instance. This helps, for example, to move configuration from a development environment to a pre-production or production environment.
Use
To use this tool, you need to have the role administrator. Firstly, use the DEV TOOLS -> Import / Export Data menu option.
This menu option will open a new page with three tabs.
Export
In the EXPORT tab, you will find the options to export the data of the configdb of the instance in which you are. There are several data export options:
Export All, that exports all the configuration data of the platform, except projects and users.
Export By User, that exports all the data of the user, and the selected user. Projects are not exported.
Export a User’s Project, that exports the selected project, all its resources and the users used on the project.
Export Users, that exports only the selected users.
Export Mongo Data, that exports a zip containing two scripts, one for import and one for export, for the ontology data stored in Mongo.
If there are domains created in the Flowengine, Notebooks or Dataflows, all data will be exported too. Later, when importing, these data will be deployed automatically.
Once the desired option for the export has been selected, select the Export Data button and, after a few minutes (depending on the volume of data, it may take more or less time), the export file will be downloaded automatically in JSON format. It will be this file that you will have to use in the import section to load this data in another environment.
From version 2.2.1-hyperblast the export will be done in the background.
For version 2.2.1-hyperblast or higher, the export is done in the background. This will improve the performance in exports of large amounts of data. To do this, the following buttons have been added in the EXPORT tab:
Once the export option has been selected, press the Start Export button to start the export in the background.
After a few minutes, you can use the Download File button to download the file generated from the export. Should the export had not finished, a warning will appear indicating that you need to wait for it to finish before you can download the file:
Compare Schema
This tab allows you to compare the schema of the current instance with another schema of a different instance.
The Export Scheme button exports the configuration scheme. This option is useful for comparing the schema of several different instances of the Onesait Platform and see the differences between them.
The comparison generates a JSON that indicates all the changes, describing the type of change and the fields and types of data that have changed.
Import
To import data into an open platform instance, you need to provide a valid JSON, generated by that instance or other instance in the past. The file will be generated from the EXPORT tab.
The file can be uploaded using the IMPORT tab. Once the file is uploaded, you can select which types of data are going to be imported. If one type of data is selected to be imported and it has dependencies with other data, then those referenced data will be also imported and you will be notified via warning messages.
If you want to overwrite the data in the destination, select the option "Override":
For instance, if ontologies are selected but not the users, then the import process will also import the users that created the ontologies, because those data are necessary to keep the data consistency and the process will also generate a warning message that identifies the data.
Once the data has been imported, and if you have selected the override option, you will need to clear the cache to see the updated information. To do this, simply use the "Clean Cache" button: