Skip to main content

Database Export

This command is used to dump the database to a JSON file. It can be used to backup the database or to move the database to another instance.

Online Export

To export the database while the backend server is running, use the following API endpoint:

curl -X 'POST' 'http://localhost:1985/api/backend/command/database/export'

Offline Export

info

This command should only be used when the backend server is offline. Running this command while the backend server is running may not work as the database could be locked. To export the database while the backend server is running, use the API endpoint provided above.

Using Gradle

gradle bootRun --args="--command=database-export --output=/path/to/dump.json"

Using Java

java -jar backend.jar --command=database-export --output=/path/to/dump.json