Export a Paused Database
A paused database can be exported as often as you like, whatever the plan: an export is a gzipped SQL dump of the whole database, like a backup. Paused here means closed (closed: true on the database): over the plan's database limit, on a plan that doesn't include databases, or a paused WordPress site's own database. This route says whether the database can be exported now and returns its latest export. See Export a closed database for the dashboard side (Export data on the database's Backups tab).
Every export route needs the role's Database data read permission, like a backup download, and no plan entitlement. They are also on the agent plane under /v1/agent/databases/{uuid}/export, for account-scoped agent tokens. A database of another account answers 404. While the account is suspended, whatever the reason, nothing can be exported: every export route answers 403 account_suspended.
Response (200 OK)
{uuid, name, status}.true when the database is paused, so it can be exported. false for an open database: back it up instead.true while the database is being paused: export it once closed is true.ready, and no backup or export of it is running.pending or running.null when there is none.Export object
trigger_source: "manual".pending → running → completed, or failed. A failed export can't be downloaded: export the database again..sql.gz file; 0 until it has completed.Errors
Insufficient permissions for this action (no Database data read), No active account for this request, or account_suspended (the account is suspended).database not found.database_backups_unavailable or databases_unavailable: the feature isn't available yet.Start an Export
Export the paused database now (the dashboard's Export data). No body is needed. The export is created pending; ngris then dumps the whole database (its tables, data and views) to a gzipped SQL file and it turns completed. Poll GET /v1/databases/{uuid}/export for the status, then download it. One backup or export of a database runs at a time.
Each export replaces the previous one. Starting an export deletes the earlier exports taken since the database was paused, and a backup taken with POST /v1/databases/{uuid}/backups while it was paused: a paused database's data can't change, so the latest export has all of it. Automatic backups, and backups taken before the database was paused, are kept as they are. A paused database takes one backup while it is paused, and an export counts as that one: after an export, POST /v1/databases/{uuid}/backups answers 409 database_closed, so export again instead.
Response (202 Accepted)
{"export": {…}}: the new export object, status: "pending".
Errors
account_suspended (the account is suspended).database not found.database_not_paused: Only a paused database can be exported. Back this one up instead.database_pausing: This database is being paused. Try again in a minute.backup_in_progress: This database is already being exported. Wait for it to finish. (an export or a backup of it is pending or running)database_status: the database isn't ready (e.g. Not possible while the database is deleting.); resource and status say which.
database_backups_unavailable or databases_unavailable.Download the Export
Stream the paused database's latest completed export: the gzipped SQL dump, Content-Type: application/gzip, as an attachment named <database name>-<export uuid>.sql.gz (characters other than letters, digits, ., _ and - in the name become -). The dump has no DROP TABLE statements: import it into an empty database. Download it as many times as you need.
Errors
account_suspended (the account is suspended).export_not_found: This database has no export yet. Export it first.; database not found; or backup artifact not found (the stored file is gone: export the database again).export_not_ready: The export isn't ready yet. Download it when it has finished., or The last export failed. Export the database again.database_not_paused or database_pausing, as for Start an Export.
failed to read backup artifact: the storage couldn't be read; retry.Backup storage is not configured., database_backups_unavailable or databases_unavailable.Audit trail
Every export started and every download is recorded in the account audit log with event_type database: Database export requested: <name> and Database export downloaded: <name>.