{
  "schema_version": 2,
  "id": "operate/rs/references/rest-api/requests/bdbs/actions/export",
  "title": "Export database action requests",
  "url": "https://redis.io/docs/latest/operate/rs/references/rest-api/requests/bdbs/actions/export/",
  "summary": "Export database requests",
  "tags": [
    "docs",
    "operate",
    "rs"
  ],
  "last_updated": "2025-03-10T13:08:54-04:00",
  "page_type": "content",
  "content_hash": "472ac7d8abd97b9698677a76a6d57a6c189c5896eb35c52ea852e7b4d1b0c142",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "| Method | Path | Description |\n|--------|------|-------------|\n| [POST](#post-bdbs-actions-export) | `/v1/bdbs/{uid}/actions/export` | Initiate database export |"
    },
    {
      "id": "post-bdbs-actions-export",
      "title": "Initiate database export",
      "role": "content",
      "text": "[code example]\n\nInitiate a database export."
    },
    {
      "id": "permissions",
      "title": "Permissions",
      "role": "security",
      "text": "| Permission name | Roles |\n|-----------------|-------|\n| [start_bdb_export](https://redis.io/docs/latest/operate/rs/references/rest-api/permissions#start_bdb_export) | admin<br />cluster_member<br />db_member |"
    },
    {
      "id": "post-request",
      "title": "Request",
      "role": "content",
      "text": "#### Example HTTP request\n\n[code example]\n\n#### Headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n\n#### URL parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| uid | integer | The unique ID of the database |\n\n\n#### Body\n\nThe request body should contain a JSON object with the following export parameters:\n\n| Field | Type | Description |\n|-------|------|-------------|\n| export_location | [backup_location/export_location](https://redis.io/docs/latest/operate/rs/references/rest-api/objects/bdb/backup_location) object | Details for the export destination. Call [`GET /v1/jsonschema`](https://redis.io/docs/latest/operate/rs/references/rest-api/requests/jsonschema#get-jsonschema) on the bdb object and review the `backup_location` field to retrieve the object's structure.  |\n| email_notification | boolean | Enable/disable an email notification on export failure/ completion. (optional) |\n\n##### Example JSON body\n\n[code example]\n\nThe above request initiates an export operation to the specified location."
    },
    {
      "id": "post-response",
      "title": "Response",
      "role": "returns",
      "text": "Returns a status code.\n\n#### Status codes {#post-status-codes}\n\n| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | The request is accepted and is being processed. In order to monitor progress, the BDB's `export_status`, `export_progress`, and `export_failure_reason` attributes can be consulted. |\n| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to perform an action on a nonexistent database. |\n| [406&nbsp;Not&nbsp;Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Not all the modules loaded to the database support 'backup_restore' capability |\n| [409 Conflict](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10) | Database is currently busy with another action. In this context, this is a temporary condition and the request should be reattempted later. |"
    }
  ],
  "examples": [
    {
      "id": "post-bdbs-actions-export-ex0",
      "language": "sh",
      "code": "POST /v1/bdbs/{int: uid}/actions/export",
      "section_id": "post-bdbs-actions-export"
    },
    {
      "id": "post-request-ex0",
      "language": "sh",
      "code": "POST /v1/bdbs/1/actions/export",
      "section_id": "post-request"
    },
    {
      "id": "post-request-ex1",
      "language": "json",
      "code": "{\n    \"export_location\": {\n        \"type\": \"url\",\n        \"url\": \"ftp://...\"\n    },\n    \"email_notification\": true\n}",
      "section_id": "post-request"
    }
  ]
}
