Skip to content

Download configuration

Tashrif Billah edited this page Mar 1, 2022 · 4 revisions

DPdash web interface allows uploading a JSON config file but not download. Nonetheless, you can download one in the server backend.

export state=""
export MONGO_PASS=""
export GODEBUG=x509ignoreCN=0

mongoexport --ssl --sslCAFile=$state/ssl/ca/cacert.pem --sslPEMKeyFile=$state/ssl/mongo_client.pem --uri="mongodb://dpdash:$MONGO_PASS@`hostname`:27017/dpdmongo?authSource=admin" --collection=configs --query='{"name":"config_name"}' --out=/tmp/config_name.json

Replace config_name with the name of the configuration from /Configure tab of DPdash web interface.


Now comes the manual adjustment necessary before you are able to re-upload it. You must modify config_name.json according to the schema described here. In bare minimum, you must strip off the _id, owner, type, readers, created fields. The config field also requires mandatory adjustment as shown here.


The above two-step process has been streamlined in download_config.sh:

Usage: ./download_config.sh config_name /tmp/config_name.json
Provide configuration name and output file name

Clone this wiki locally