book
Article ID: KB0080274
calendar_today
Updated On:
Description
This provides an example of using the Business Directory Rest API to carry out a backup export and a backup import.
Resolution
Using curl, you can execute a Rest API call to back up the Business Directory metadata, or to to import a backup into Business Directory. Below is an example.
To take a backup named "BD_Backup.car"curl --insecure -u "admin:admin" -X GET "https://localhost:9532/rest/v1/metadata" -o BD_Backup.carTo import a backupcurl --insecure -u "admin:admin" -i -F "overwrite=true" -F "file=@BD_Backup.car" -X PUT "https://localhost:9532/rest/v1/metadata"Note that the "
overwrite=true" flag will cause the existing metadata to be completely deleted (i.e. all sites, categories, etc. will be wiped out and replaced by the metadata from BD_Backup.car).
Issue/Introduction
How can I use the Business Directory Rest API to do a backup export (and a backup import)?