{
  "id": "import",
  "title": "Import database action requests",
  "url": "https://redis.io/docs/latest/operate/rs/7.8/references/rest-api/requests/bdbs/actions/import/",
  "summary": "Import database requests",
  "content": "\n| Method | Path | Description |\n|--------|------|-------------|\n| [POST](#post-bdbs-actions-import) | `/v1/bdbs/{uid}/actions/import` | Initiate manual dataset import |\n\n## Initiate manual dataset import {#post-bdbs-actions-import}\n\n```sh\nPOST /v1/bdbs/{int: uid}/actions/import\n```\n\nInitiate a manual import process.\n\n### Permissions\n\n| Permission name | Roles |\n|-----------------|-------|\n| [start_bdb_import]() | admin\u003cbr /\u003ecluster_member\u003cbr /\u003edb_member |\n\n### Request {#post-request}\n\n#### Example HTTP request\n\n```sh\nPOST /v1/bdbs/1/actions/import\n```\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```json\n{\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}\n```\n\nThis request initiates an import process using `dataset_import_sources` values that were previously configured for the database.\n\nFTP example:\n\n```json\n{\n  \"dataset_import_sources\": [\n    {\n      \"type\": \"url\",\n      \"url\": \"ftp://\u003cftp_user\u003e:\u003cftp_password\u003e@example.com/\u003cpath\u003e/\u003cfilename\u003e.rdb.gz\"\n    }\n  ]\n}\n```\n\nSFTP example:\n\n```json\n{\n  \"dataset_import_sources\": [\n    {\n      \"type\": \"sftp\",\n      \"sftp_url\": \"sftp://\u003csftp_user\u003e@example.com/\u003cpath\u003e/\u003cfilename\u003e.rdb\"\n    }\n  ]\n}\n```\n\nAWS S3 example:\n\n```json\n{\n  \"dataset_import_sources\": [\n    {\n      \"type\": \"s3\",\n      \"bucket_name\": \"backups\",\n      \"subdir\": \"test-db\",\n      \"filename\": \"\u003cfilename\u003e.rdb\",\n      \"access_key_id\": \"XXXXXXXXXXXXX\",\n      \"secret_access_key\": \"XXXXXXXXXXXXXXXX\"\n    }\n  ]\n}\n```\n\nGoogle Cloud Storage example:\n\n```json\n{\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\": \"\u003cfilename\u003e.rdb\",\n      \"private_key_id\": \"XXXXXXXXXXXXX\",\n      \"private_key\": \"XXXXXXXXXXXXXXXX\"\n    }\n  ]\n}\n```\n\nAzure Blob Storage example:\n\n```json\n{\n  \"dataset_import_sources\": [\n    {\n      \"type\": \"abs\",\n      \"container\": \"backups\",\n      \"subdir\": \"test-db\",\n      \"filename\": \"\u003cfilename\u003e.rdb\",\n      \"account_name\": \"name\",\n      \"account_key\": \"XXXXXXXXXXXXXXXX\" // Or you can use \"sas_token\": \"XXXXXXXXXXXXXXXXXX\" instead\n    }\n  ]\n}\n```\n\n### Response {#post-response}\n\nReturns 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 `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\u0026nbsp;Not\u0026nbsp;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. |\n",
  "tags": ["docs","operate","rs"],
  "last_updated": "2026-04-01T08:10:08-05:00"
}

