---
title: "Create backup interface"
method: POST
path: "/create"
tags: ["Backup"]
---

# Create backup interface

`POST /create`

Create a backup with the given name and collections

## Headers

- `request_id` string

## Request body

- BackuppbCreateBackupRequest
  - `async` boolean — async or not
  - `backup_name` string — backup name, will generate one if not set
  - `backup_root_path` string — backup root path
  - `collection_names` string[] — collection names to backup, empty to backup all
  - `db_collections` string — database and collections to backup. A json string. To support database. 2023.7.7
  - `filter` object — filter for backup
  - `force` boolean — force backup skip flush, Should make sure data has been stored into disk when using it Deprecated: set strategy=skip_flush instead
  - `gc_pause_address` string — gc pause API address
  - `gc_pause_enable` boolean — if true, stop GC to avoid the data compacted and GCed during backup, use it when the data to backup is very large.
  - `gc_pause_seconds` integer — gc pause seconds, set it larger than the time cost of backup
  - `meta_only` boolean — only backup meta, including collection schema and index info Deprecated: set strategy=meta_only instead
  - `rbac` boolean — whether backup RBAC
  - `requestId` string — uuid of request, will generate one if not set
  - `strategy` string — strategy for backup, one of [meta_only, skip_flush, bulk_flush, serial_flush], if not set will auto select
  - `with_index_extra` boolean

## Response `200`

OK

- BackuppbBackupInfoResponse
  - `code` 0 | 1 | 2 | 3 | 400 | 404
  - `data` BackuppbBackupInfoBrief
    - `backup_timestamp` integer
    - `collection_backups` BackuppbCollectionBackupInfoBrief[]
      - `backup_physical_timestamp` integer — physical unix time of backup
      - `backup_timestamp` integer — logical time of backup, used for restore
      - `channel_checkpoints` object
      - `collection_id` integer
      - `collection_name` string
      - `db_name` string
      - `has_index` boolean
      - `id` string
      - `index_infos` BackuppbIndexInfo[]
        - `create_time` integer
        - `field_id` integer — extra info from etcd
        - `field_name` string
        - `index_id` integer
        - `index_name` string
        - `index_params` BackuppbKeyValuePair[]
          - `key` string
          - `value` string
        - `index_type` string
        - `is_auto_index` boolean
        - `max_index_version` integer
        - `min_index_version` integer
        - `params` object
        - `type_params` BackuppbKeyValuePair[]
          - `key` string
          - `value` string
        - `user_index_params` BackuppbKeyValuePair[]
          - `key` string
          - `value` string
      - `load_state` string
      - `properties` BackuppbKeyValuePair[]
        - `key` string
        - `value` string
      - `schema` BackuppbCollectionSchema
        - `autoID` boolean
        - `description` string
        - `enable_dynamic_field` boolean
        - `fields` BackuppbFieldSchema[]
          - `autoID` boolean
          - `data_type` 0 | 1 | 2 | 3 | 4 | 5 | 10 | 11 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 200 | 201
          - `default_value` BackuppbValueField
            - `data` unknown
          - `default_value_base64` string
          - `default_value_proto` string — Deprecated: Do not use.
          - `description` string
          - `element_type` 0 | 1 | 2 | 3 | 4 | 5 | 10 | 11 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 200 | 201
          - `fieldID` integer
          - `index_params` BackuppbKeyValuePair[]
            - `key` string
            - `value` string
          - `is_dynamic` boolean
          - `is_function_output` boolean
          - `is_partition_key` boolean
          - `is_primary_key` boolean
          - `name` string
          - `nullable` boolean
          - `state` 0 | 1 | 2 | 3
          - `type_params` BackuppbKeyValuePair[]
            - `key` string
            - `value` string
        - `functions` BackuppbFunctionSchema[]
          - `description` string
          - `id` integer
          - `input_field_ids` integer[]
          - `input_field_names` string[]
          - `name` string
          - `output_field_ids` integer[]
          - `output_field_names` string[]
          - `params` BackuppbKeyValuePair[]
            - `key` string
            - `value` string
          - `type` 0 | 1 | 2
        - `name` string
        - `properties` BackuppbKeyValuePair[]
          - `key` string
          - `value` string
        - `struct_array_fields` BackuppbStructArrayFieldSchema[]
          - `description` string
          - `fieldID` integer
          - `fields` BackuppbFieldSchema[]
            - `autoID` boolean
            - `data_type` 0 | 1 | 2 | 3 | 4 | 5 | 10 | 11 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 200 | 201
            - `default_value` BackuppbValueField
              - …
            - `default_value_base64` string
            - `default_value_proto` string — Deprecated: Do not use.
            - `description` string
            - `element_type` 0 | 1 | 2 | 3 | 4 | 5 | 10 | 11 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 200 | 201
            - `fieldID` integer
            - `index_params` BackuppbKeyValuePair[]
              - …
            - `is_dynamic` boolean
            - `is_function_output` boolean
            - `is_partition_key` boolean
            - `is_primary_key` boolean
            - `name` string
            - `nullable` boolean
            - `state` 0 | 1 | 2 | 3
            - `type_params` BackuppbKeyValuePair[]
              - …
          - `name` string
      - `shards_num` integer
      - `size` integer
    - `database_backups` BackuppbDatabaseBackupInfo[]
      - `db_id` integer
      - `db_name` string
      - `ezk` string
      - `properties` BackuppbKeyValuePair[]
        - `key` string
        - `value` string
    - `end_time` integer
    - `errorMessage` string
    - `format` string — see BackupInfo.format
    - `id` string — from task
    - `meta_size` integer — sum of all meta files size
    - `milvus_version` string
    - `name` string — from backup meta
    - `progress` integer
    - `rpc_channel_info` BackuppbRPCChannelInfo
      - `name` string
      - `position` string
    - `size` 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)
