{
  "id": "import",
  "title": "Import database action requests",
  "url": "https://redis.io/docs/latest/operate/rs/references/rest-api/requests/bdbs/actions/import/",
  "summary": "Import database requests",
  "tags": [
    "docs",
    "operate",
    "rs"
  ],
  "last_updated": "2026-04-08T12:21:52-07:00",
  "page_type": "content",
  "content_hash": "ffdfbc8a115d027e10f710191389eba3fb25eae6529329f7700621534270a5b2",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "| Method | Path | Description |\n|--------|------|-------------|\n| [POST](#post-bdbs-actions-import) | `/v1/bdbs/{uid}/actions/import` | Initiate manual dataset import |"
    },
    {
      "id": "initiate-manual-dataset-import-post-bdbs-actions-import",
      "title": "Initiate manual dataset import {#post-bdbs-actions-import}",
      "role": "content",
      "text": "[code example]\n\nInitiate a manual import process."
    },
    {
      "id": "permissions",
      "title": "Permissions",
      "role": "security",
      "text": "| Permission name | Roles |\n|-----------------|-------|\n| [start_bdb_import]() | admin<br />cluster_member<br />db_member |"
    },
    {
      "id": "request-post-request",
      "title": "Request {#post-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| Content-Length | 0 | Length of the request body in octets |\n\n#### URL parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| uid | integer | The unique ID of the database |\n\n#### Body\n\nThe request _may_ contain a subset of the [BDB JSON object](), which includes the following import-related attributes:\n\n| Field | Type | Description |\n|-------|------|-------------|\n| dataset_import_sources | array of [dataset_import_sources]() objects | Details for the import sources. Call [`GET /v1/jsonschema`]() on the bdb object and review the `dataset_import_sources` field to retrieve the object's structure.  |\n| email_notification | boolean | Enable/disable an email notification on import failure/ completion. (optional) |\n\n\nOther attributes are not allowed and will cause the request to fail.\n\n\n##### Example JSON body\n\nGeneral example:\n\n[code example]\n\nThis request initiates an import process using `dataset_import_sources` values that were previously configured for the database.\n\nFTP example:\n\n[code example]\n\nSFTP example:\n\n[code example]\n\nAWS S3 example:\n\n[code example]\n\nGoogle Cloud Storage example:\n\n[code example]\n\nAzure Blob Storage example:\n\n[code example]"
    },
    {
      "id": "response-post-response",
      "title": "Response {#post-response}",
      "role": "returns",
      "text": "Returns a status code."
    },
    {
      "id": "status-codes-post-status-codes",
      "title": "Status codes {#post-status-codes}",
      "role": "content",
      "text": "| 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 `import_status`, `import_progress`, and `import_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": "initiate-manual-dataset-import-post-bdbs-actions-import-ex0",
      "language": "sh",
      "code": "POST /v1/bdbs/{int: uid}/actions/import",
      "section_id": "initiate-manual-dataset-import-post-bdbs-actions-import"
    },
    {
      "id": "request-post-request-ex0",
      "language": "sh",
      "code": "POST /v1/bdbs/1/actions/import",
      "section_id": "request-post-request"
    },
    {
      "id": "request-post-request-ex1",
      "language": "json",
      "code": "{\n    \"dataset_import_sources\": [\n        {\n            \"type\": \"url\",\n            \"url\": \"http://...\"\n        },\n        {\n            \"type\": \"url\",\n            \"url\": \"redis://...\"\n        }\n    ],\n    \"email_notification\": true\n}",
      "section_id": "request-post-request"
    },
    {
      "id": "request-post-request-ex2",
      "language": "json",
      "code": "{\n  \"dataset_import_sources\": [\n    {\n      \"type\": \"url\",\n      \"url\": \"ftp://<ftp_user>:<ftp_password>@example.com/<path>/<filename>.rdb.gz\"\n    }\n  ]\n}",
      "section_id": "request-post-request"
    },
    {
      "id": "request-post-request-ex3",
      "language": "json",
      "code": "{\n  \"dataset_import_sources\": [\n    {\n      \"type\": \"sftp\",\n      \"sftp_url\": \"sftp://<sftp_user>@example.com/<path>/<filename>.rdb\"\n    }\n  ]\n}",
      "section_id": "request-post-request"
    },
    {
      "id": "request-post-request-ex4",
      "language": "json",
      "code": "{\n  \"dataset_import_sources\": [\n    {\n      \"type\": \"s3\",\n      \"bucket_name\": \"backups\",\n      \"subdir\": \"test-db\",\n      \"filename\": \"<filename>.rdb\",\n      \"access_key_id\": \"XXXXXXXXXXXXX\",\n      \"secret_access_key\": \"XXXXXXXXXXXXXXXX\"\n    }\n  ]\n}",
      "section_id": "request-post-request"
    },
    {
      "id": "request-post-request-ex5",
      "language": "json",
      "code": "{\n  \"dataset_import_sources\": [\n    {\n      \"type\": \"gs\",\n      \"bucket_name\": \"backups\",\n      \"client_id\": \"XXXXXXXX\",\n      \"client_email\": \"cloud-storage-client@my-project-id.iam.gserviceaccount.com\",\n      \"subdir\": \"test-db\",\n      \"filename\": \"<filename>.rdb\",\n      \"private_key_id\": \"XXXXXXXXXXXXX\",\n      \"private_key\": \"XXXXXXXXXXXXXXXX\"\n    }\n  ]\n}",
      "section_id": "request-post-request"
    },
    {
      "id": "request-post-request-ex6",
      "language": "json",
      "code": "{\n  \"dataset_import_sources\": [\n    {\n      \"type\": \"abs\",\n      \"container\": \"backups\",\n      \"subdir\": \"test-db\",\n      \"filename\": \"<filename>.rdb\",\n      \"account_name\": \"name\",\n      \"account_key\": \"XXXXXXXXXXXXXXXX\" // Or you can use \"sas_token\": \"XXXXXXXXXXXXXXXXXX\" instead\n    }\n  ]\n}",
      "section_id": "request-post-request"
    }
  ]
}
