---
title: "Restore interface"
method: POST
path: "/restore"
tags: ["Restore"]
---

# Restore interface

`POST /restore`

Submit a request to restore the data from backup

## Headers

- `request_id` string

## Request body

- BackuppbRestoreBackupRequest
  - `async` boolean — execute asynchronously or not
  - `backup_name` string — backup name to restore
  - `bucket_name` string — if bucket_name and path is set. will override bucket/path in config.
  - `collection_names` string[] — collections to restore
  - `collection_renames` object — 2, give a map to rename the collections, if not given, use the original name. collection_renames has higher priority than collection_suffix
  - `collection_suffix` string — Support two ways to rename the collections while recover 1, set a suffix
  - `db_collections` string — database and collections to restore. A json string. for example: {"db1":["collection1"],"db2":["collection2","collection3"]}
  - `db_collections_after_rename` string — determine which database and collections to restore after rename
  - `dropExistCollection` boolean — if true, drop existing target collection before create
  - `dropExistIndex` boolean — if true, drop existing index of target collection before create
  - `ezkMapping` object — map of old ezk to new ezk, used to replace encryption keys during restore
  - `id` string
  - `maxShardNum` integer — target max shard number
  - `metaOnly` boolean — if true only restore meta, not restore data
  - `path` string — if bucket_name and path is set. will override bucket/path in config.
  - `rbac` boolean — whether restore RBAC
  - `requestId` string — uuid of request, will generate one if not set
  - `restoreIndex` boolean — if true restore index info
  - `restorePlan` BackuppbRestorePlan
    - `filter` object
    - `mapping` BackuppbRestoreMapping[]
      - `colls` BackuppbRestoreCollectionMapping[]
        - `override` BackuppbRestoreCollectionOverride
          - `description` string
          - `shardNum` integer
        - `source` string
        - `target` string
      - `source` string
      - `target` string
      - `withProp` boolean
  - `skipCreateCollection` boolean — if true, will skip collection, use when collection exist, restore index or data
  - `skipImportDiskQuotaCheck` boolean — if true, skip the diskQuota in Import
  - `skipParams` BackuppbSkipParams
    - `collectionProperties` string[]
    - `fieldIndexParams` string[]
    - `fieldTypeParams` string[]
    - `indexParams` string[]
  - `truncateBinlogByTs` boolean — if true, truncate binlog by timestamp, for cdc
  - `useAutoIndex` boolean — if true use autoindex when restore vector index
  - `useV2Restore` boolean

## Response `200`

OK

- BackuppbRestoreBackupResponse
  - `code` 0 | 1 | 2 | 3 | 400 | 404
  - `data` BackuppbRestoreBackupTaskResponse
    - `collection_restore_tasks` BackuppbRestoreCollectionTaskResponse[]
      - `end_time` integer
      - `errorMessage` string
      - `id` string
      - `progress` integer
      - `start_time` integer
      - `state_code` 0 | 1 | 2 | 3 | 4
      - `target_collection_name` string
      - `target_db_name` string
    - `end_time` integer
    - `errorMessage` string
    - `id` string
    - `progress` integer
    - `start_time` integer
    - `state_code` 0 | 1 | 2 | 3 | 4
  - `msg` string — error msg if fail
  - `requestId` string — uuid of the request to response

---

[API](https://skmtc.net/zilliztech/apis/milvus-backup-service.md) · [All operations](https://skmtc.net/zilliztech/apis/milvus-backup-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zilliztech/milvus-backup-service/versions/f9b1b1989810/schema)
