mirror of
https://github.com/qdrant/qdrant.git
synced 2026-09-29 09:27:53 -05:00
* WIP: shards recovering API: download snapshot * fmt * snapshot recovery API * fmt * snapshot recovery integration test + fixes * review fixes * review fixes 2 * Update lib/storage/src/content_manager/snapshots/recover.rs Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com> Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
155 lines
4.4 KiB
YAML
155 lines
4.4 KiB
YAML
#@ load("openapi.lib.yml", "response", "reference", "type", "array")
|
|
|
|
paths:
|
|
/collections/{collection_name}/snapshots/recover:
|
|
put:
|
|
tags:
|
|
- snapshots
|
|
- collections
|
|
summary: Recover from a snapshot
|
|
description: Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection.
|
|
operationId: recover_from_snapshot
|
|
parameters:
|
|
- name: collection_name
|
|
in: path
|
|
description: Name of the collection
|
|
required: true
|
|
schema:
|
|
type: string
|
|
requestBody:
|
|
description: Snapshot to recover from
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/SnapshotRecover"
|
|
responses: #@ response(type("boolean"))
|
|
|
|
/collections/{collection_name}/snapshots:
|
|
get:
|
|
tags:
|
|
- snapshots
|
|
- collections
|
|
summary: List collection snapshots
|
|
description: Get list of snapshots for a collection
|
|
operationId: list_snapshots
|
|
parameters:
|
|
- name: collection_name
|
|
in: path
|
|
description: Name of the collection
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses: #@ response(array(reference("SnapshotDescription")))
|
|
|
|
post:
|
|
tags:
|
|
- snapshots
|
|
- collections
|
|
summary: Create collection snapshot
|
|
description: Create new snapshot for a collection
|
|
operationId: create_snapshot
|
|
parameters:
|
|
- name: collection_name
|
|
in: path
|
|
description: Name of the collection for which to create a snapshot
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses: #@ response(reference("SnapshotDescription"))
|
|
|
|
/collections/{collection_name}/snapshots/{snapshot_name}:
|
|
get:
|
|
tags:
|
|
- snapshots
|
|
- collections
|
|
summary: Download collection snapshot
|
|
description: Download specified snapshot from a collection as a file
|
|
operationId: get_snapshot
|
|
parameters:
|
|
- name: collection_name
|
|
in: path
|
|
description: Name of the collection
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: snapshot_name
|
|
in: path
|
|
description: Name of the snapshot to download
|
|
required: true
|
|
schema:
|
|
type: string
|
|
|
|
responses:
|
|
default:
|
|
description: error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
4XX:
|
|
description: error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
'200':
|
|
description: Snapshot file
|
|
content:
|
|
application/octet-stream:
|
|
schema:
|
|
type: string
|
|
format: binary
|
|
|
|
/snapshots:
|
|
get:
|
|
tags:
|
|
- snapshots
|
|
summary: List of storage snapshots
|
|
description: Get list of snapshots of the whole storage
|
|
operationId: list_full_snapshots
|
|
responses: #@ response(array(reference("SnapshotDescription")))
|
|
|
|
post:
|
|
tags:
|
|
- snapshots
|
|
summary: Create storage snapshot
|
|
description: Create new snapshot of the whole storage
|
|
operationId: create_full_snapshot
|
|
responses: #@ response(reference("SnapshotDescription"))
|
|
|
|
/snapshots/{snapshot_name}:
|
|
get:
|
|
tags:
|
|
- snapshots
|
|
summary: Download storage snapshot
|
|
description: Download specified snapshot of the whole storage as a file
|
|
operationId: get_full_snapshot
|
|
parameters:
|
|
- name: snapshot_name
|
|
in: path
|
|
description: Name of the snapshot to download
|
|
required: true
|
|
schema:
|
|
type: string
|
|
|
|
responses:
|
|
default:
|
|
description: error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
4XX:
|
|
description: error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
'200':
|
|
description: Snapshot file
|
|
content:
|
|
application/octet-stream:
|
|
schema:
|
|
type: string
|
|
format: binary
|