Export/import Configuration
#
Export/import metadata from MongoDBFollow the steps below to export and import the server metadata configuration manually. By default, the Users, Channels, Clients, ContactGroups and Mediators collections will be exported.
Ensure that you stop the server before exporting and importing.
#
ExportCopy the file openhim-configuration-export.sh to a folder where you wish your export to be saved. Run the shell script by executing the following command:
If your MongoDB Server and Mongo Client are different versions your may need to add
--forceTableScan
to themongodump
command in the script.
Your exported collections should be located in the folder structure '/dump/openhim/'.
For full import/export API details see here.
#
ImportTo import you data ensure that you are in the correct folder where the dump files are located. Execute the below command to import your collections.
Note: If you have changed your database name, then do so for the export/import as well.
#
Export/import metadata from the OpenHIM ConsoleExport/import can now be done directly from the OpenHIM console which may be easier.
Navigate to the Export/Import
page on the console.
#
ExportTo export your configuration, open the relevant drop downs to check that the desired configs are selected (all configs are selected by default). Deselect any unwanted settings. Then click Generate Export Script
. See below for expected screen.
#
ImportTo import config drag and drop your export file, generated from the desired OpenHIM instance, into the specified box.
#
Export More DataIf you need to export more data from your OpenHIM instance, add the desired mongo collection names to the list in the export script using the export method described above.
List of all OpenHIM MongoDb collections:
- agendaJobs
- alerts
- auditMeta
- audits
- autoretries
- channelAudits
- channels
- clients
- contactgroups
- dbversions
- events
- keystores
- log
- mediators
- metrics
- tasks
- transactions
- users
- visualizers
To add transactions to the data dump for example append the name transactions
to the list in the script: