Qdrant.Api.Http.Snapshots (Qdrant v0.1.18)

Copy Markdown View Source

Qdrant snapshot backup, recovery, upload, and download operations.

Functions accepting a Qdrant.Client are the canonical API. Calls without a client remain available for compatibility and use the application configuration.

Summary

Functions

Returns the full snapshot contents as a bounded in-memory binary.

Returns the shard snapshot contents as a bounded in-memory binary.

Returns the collection snapshot contents as a bounded in-memory binary.

Recovers a collection from uploaded snapshot data.

Streams the current state of a shard as a bounded in-memory snapshot binary.

Functions

create_full_snapshot()

@spec create_full_snapshot() :: Qdrant.Types.result()

create_full_snapshot(client)

@spec create_full_snapshot(Qdrant.Client.t()) :: Qdrant.Types.result()
@spec create_full_snapshot(Qdrant.Types.request_options() | boolean() | nil) ::
  Qdrant.Types.result()

create_full_snapshot(client, opts)

@spec create_full_snapshot(Qdrant.Client.t(), Qdrant.Types.request_options()) ::
  Qdrant.Types.result()

create_shard_snapshot(collection_name, shard_id)

@spec create_shard_snapshot(String.t(), integer()) :: Qdrant.Types.result()

create_shard_snapshot(client, collection_name, shard_id)

@spec create_shard_snapshot(Qdrant.Client.t(), String.t(), integer()) ::
  Qdrant.Types.result()
@spec create_shard_snapshot(String.t(), integer(), boolean() | nil) ::
  Qdrant.Types.result()

create_shard_snapshot(client, collection_name, shard_id, opts)

@spec create_shard_snapshot(
  Qdrant.Client.t(),
  String.t(),
  integer(),
  Qdrant.Types.request_options()
) ::
  Qdrant.Types.result()

create_snapshot(collection_name)

@spec create_snapshot(String.t()) :: Qdrant.Types.result()

create_snapshot(client, collection_name)

@spec create_snapshot(Qdrant.Client.t(), String.t()) :: Qdrant.Types.result()
@spec create_snapshot(String.t(), boolean() | nil) :: Qdrant.Types.result()

create_snapshot(client, collection_name, opts)

delete_full_snapshot(snapshot_name)

@spec delete_full_snapshot(String.t()) :: Qdrant.Types.result()

delete_full_snapshot(client, snapshot_name)

@spec delete_full_snapshot(Qdrant.Client.t(), String.t()) :: Qdrant.Types.result()
@spec delete_full_snapshot(String.t(), boolean() | nil) :: Qdrant.Types.result()

delete_full_snapshot(client, snapshot_name, opts)

@spec delete_full_snapshot(
  Qdrant.Client.t(),
  String.t(),
  Qdrant.Types.request_options()
) ::
  Qdrant.Types.result()

delete_shard_snapshot(collection_name, shard_id, snapshot_name)

@spec delete_shard_snapshot(String.t(), integer(), String.t()) ::
  Qdrant.Types.result()

delete_shard_snapshot(client, collection_name, shard_id, snapshot_name)

@spec delete_shard_snapshot(Qdrant.Client.t(), String.t(), integer(), String.t()) ::
  Qdrant.Types.result()
@spec delete_shard_snapshot(String.t(), integer(), String.t(), boolean() | nil) ::
  Qdrant.Types.result()

delete_shard_snapshot(client, collection_name, shard_id, snapshot_name, opts)

@spec delete_shard_snapshot(
  Qdrant.Client.t(),
  String.t(),
  integer(),
  String.t(),
  Qdrant.Types.request_options()
) :: Qdrant.Types.result()

delete_snapshot(collection_name, snapshot_name)

@spec delete_snapshot(String.t(), String.t()) :: Qdrant.Types.result()

delete_snapshot(client, collection_name, snapshot_name)

@spec delete_snapshot(Qdrant.Client.t(), String.t(), String.t()) ::
  Qdrant.Types.result()
@spec delete_snapshot(String.t(), String.t(), boolean() | nil) ::
  Qdrant.Types.result()

delete_snapshot(client, collection_name, snapshot_name, opts)

download_full_snapshot_to_file(snapshot_name, destination)

@spec download_full_snapshot_to_file(String.t(), Path.t()) ::
  {:ok, Path.t()} | {:error, Qdrant.Error.t()}

download_full_snapshot_to_file(client, snapshot_name, destination)

@spec download_full_snapshot_to_file(Qdrant.Client.t(), String.t(), Path.t()) ::
  {:ok, Path.t()} | {:error, Qdrant.Error.t()}
@spec download_full_snapshot_to_file(
  String.t(),
  Path.t(),
  Qdrant.Types.request_options()
) ::
  {:ok, Path.t()} | {:error, Qdrant.Error.t()}

download_full_snapshot_to_file(client, snapshot_name, destination, opts)

@spec download_full_snapshot_to_file(
  Qdrant.Client.t(),
  String.t(),
  Path.t(),
  Qdrant.Types.request_options()
) :: {:ok, Path.t()} | {:error, Qdrant.Error.t()}

Streams a full snapshot to destination.

download_shard_snapshot_to_file(collection_name, shard_id, snapshot_name, destination)

@spec download_shard_snapshot_to_file(String.t(), integer(), String.t(), Path.t()) ::
  {:ok, Path.t()} | {:error, Qdrant.Error.t()}

download_shard_snapshot_to_file(client, collection_name, shard_id, snapshot_name, destination)

@spec download_shard_snapshot_to_file(
  Qdrant.Client.t(),
  String.t(),
  integer(),
  String.t(),
  Path.t()
) ::
  {:ok, Path.t()} | {:error, Qdrant.Error.t()}
@spec download_shard_snapshot_to_file(
  String.t(),
  integer(),
  String.t(),
  Path.t(),
  Qdrant.Types.request_options()
) :: {:ok, Path.t()} | {:error, Qdrant.Error.t()}

download_shard_snapshot_to_file(client, collection_name, shard_id, snapshot_name, destination, opts)

@spec download_shard_snapshot_to_file(
  Qdrant.Client.t(),
  String.t(),
  integer(),
  String.t(),
  Path.t(),
  Qdrant.Types.request_options()
) :: {:ok, Path.t()} | {:error, Qdrant.Error.t()}

Streams a shard snapshot to destination.

download_snapshot_to_file(collection_name, snapshot_name, destination)

@spec download_snapshot_to_file(String.t(), String.t(), Path.t()) ::
  {:ok, Path.t()} | {:error, Qdrant.Error.t()}

download_snapshot_to_file(client, collection_name, snapshot_name, destination)

@spec download_snapshot_to_file(Qdrant.Client.t(), String.t(), String.t(), Path.t()) ::
  {:ok, Path.t()} | {:error, Qdrant.Error.t()}
@spec download_snapshot_to_file(
  String.t(),
  String.t(),
  Path.t(),
  Qdrant.Types.request_options()
) ::
  {:ok, Path.t()} | {:error, Qdrant.Error.t()}

download_snapshot_to_file(client, collection_name, snapshot_name, destination, opts)

@spec download_snapshot_to_file(
  Qdrant.Client.t(),
  String.t(),
  String.t(),
  Path.t(),
  Qdrant.Types.request_options()
) :: {:ok, Path.t()} | {:error, Qdrant.Error.t()}

Streams a collection snapshot to destination.

get_full_snapshot(snapshot_name)

@spec get_full_snapshot(String.t()) :: Qdrant.Types.result()

get_full_snapshot(client, snapshot_name)

@spec get_full_snapshot(Qdrant.Client.t(), String.t()) :: Qdrant.Types.result()

get_full_snapshot(client, snapshot_name, opts)

Returns the full snapshot contents as a bounded in-memory binary.

get_shard_snapshot(collection_name, shard_id, snapshot_name)

@spec get_shard_snapshot(String.t(), integer(), String.t()) :: Qdrant.Types.result()

get_shard_snapshot(client, collection_name, shard_id, snapshot_name)

@spec get_shard_snapshot(Qdrant.Client.t(), String.t(), integer(), String.t()) ::
  Qdrant.Types.result()

get_shard_snapshot(client, collection_name, shard_id, snapshot_name, opts)

Returns the shard snapshot contents as a bounded in-memory binary.

get_snapshot(collection_name, snapshot_name)

@spec get_snapshot(String.t(), String.t()) :: Qdrant.Types.result()

get_snapshot(client, collection_name, snapshot_name)

@spec get_snapshot(Qdrant.Client.t(), String.t(), String.t()) :: Qdrant.Types.result()

get_snapshot(client, collection_name, snapshot_name, opts)

Returns the collection snapshot contents as a bounded in-memory binary.

list_full_snapshots()

@spec list_full_snapshots() :: Qdrant.Types.result()

list_full_snapshots(client)

@spec list_full_snapshots(Qdrant.Client.t()) :: Qdrant.Types.result()
@spec list_full_snapshots(Qdrant.Types.request_options()) :: Qdrant.Types.result()

list_full_snapshots(client, opts)

list_shard_snapshots(collection_name, shard_id)

@spec list_shard_snapshots(String.t(), integer()) :: Qdrant.Types.result()

list_shard_snapshots(client, collection_name, shard_id)

@spec list_shard_snapshots(Qdrant.Client.t(), String.t(), integer()) ::
  Qdrant.Types.result()

list_shard_snapshots(client, collection_name, shard_id, opts)

@spec list_shard_snapshots(
  Qdrant.Client.t(),
  String.t(),
  integer(),
  Qdrant.Types.request_options()
) ::
  Qdrant.Types.result()

list_snapshots(collection_name)

@spec list_snapshots(String.t()) :: Qdrant.Types.result()

list_snapshots(client, collection_name)

@spec list_snapshots(Qdrant.Client.t(), String.t()) :: Qdrant.Types.result()

list_snapshots(client, collection_name, opts)

recover_from_snapshot(collection_name, body)

@spec recover_from_snapshot(String.t(), Qdrant.Types.request_body()) ::
  Qdrant.Types.result()

recover_from_snapshot(client, collection_name, body)

@spec recover_from_snapshot(
  Qdrant.Client.t(),
  String.t(),
  Qdrant.Types.request_body()
) ::
  Qdrant.Types.result()
@spec recover_from_snapshot(
  String.t(),
  Qdrant.Types.request_body(),
  Qdrant.Types.request_options() | boolean() | nil
) :: Qdrant.Types.result()

recover_from_snapshot(client, collection_name, body, opts)

@spec recover_from_snapshot(
  Qdrant.Client.t(),
  String.t(),
  Qdrant.Types.request_body(),
  Qdrant.Types.request_options()
) :: Qdrant.Types.result()
@spec recover_from_snapshot(
  String.t(),
  Qdrant.Types.request_body(),
  boolean() | nil,
  String.t() | nil
) ::
  Qdrant.Types.result()

recover_from_uploaded_snapshot(collection_name, snapshot_data)

@spec recover_from_uploaded_snapshot(String.t(), binary()) :: Qdrant.Types.result()

recover_from_uploaded_snapshot(client, collection_name, snapshot_data)

@spec recover_from_uploaded_snapshot(Qdrant.Client.t(), String.t(), binary()) ::
  Qdrant.Types.result()
@spec recover_from_uploaded_snapshot(
  String.t(),
  binary(),
  Qdrant.Types.request_options() | boolean() | nil
) :: Qdrant.Types.result()

recover_from_uploaded_snapshot(client, collection_name, snapshot_data, opts)

@spec recover_from_uploaded_snapshot(
  Qdrant.Client.t(),
  String.t(),
  binary(),
  Qdrant.Types.request_options()
) :: Qdrant.Types.result()
@spec recover_from_uploaded_snapshot(
  String.t(),
  binary(),
  boolean() | nil,
  String.t() | nil
) ::
  Qdrant.Types.result()

Recovers a collection from uploaded snapshot data.

Binary data is uploaded with multipart field snapshot. Set source: :file to stream a path, or use recover_from_uploaded_snapshot_file/4. The multipart filename can be overridden with :filename.

recover_from_uploaded_snapshot(collection_name, snapshot_data, wait, priority, checksum)

@spec recover_from_uploaded_snapshot(
  String.t(),
  binary(),
  boolean() | nil,
  String.t() | nil,
  String.t() | nil
) :: Qdrant.Types.result()

recover_from_uploaded_snapshot_file(collection_name, path)

@spec recover_from_uploaded_snapshot_file(String.t(), Path.t()) ::
  Qdrant.Types.result()

recover_from_uploaded_snapshot_file(client, collection_name, path)

@spec recover_from_uploaded_snapshot_file(Qdrant.Client.t(), String.t(), Path.t()) ::
  Qdrant.Types.result()
@spec recover_from_uploaded_snapshot_file(
  String.t(),
  Path.t(),
  Qdrant.Types.request_options()
) ::
  Qdrant.Types.result()

recover_from_uploaded_snapshot_file(client, collection_name, path, opts)

@spec recover_from_uploaded_snapshot_file(
  Qdrant.Client.t(),
  String.t(),
  Path.t(),
  Qdrant.Types.request_options()
) :: Qdrant.Types.result()

recover_shard_from_snapshot(collection_name, shard_id, body)

@spec recover_shard_from_snapshot(String.t(), integer(), Qdrant.Types.request_body()) ::
  Qdrant.Types.result()

recover_shard_from_snapshot(client, collection_name, shard_id, body)

@spec recover_shard_from_snapshot(
  Qdrant.Client.t(),
  String.t(),
  integer(),
  Qdrant.Types.request_body()
) ::
  Qdrant.Types.result()
@spec recover_shard_from_snapshot(
  String.t(),
  integer(),
  Qdrant.Types.request_body(),
  Qdrant.Types.request_options() | boolean() | nil
) :: Qdrant.Types.result()

recover_shard_from_snapshot(client, collection_name, shard_id, body, opts)

@spec recover_shard_from_snapshot(
  Qdrant.Client.t(),
  String.t(),
  integer(),
  Qdrant.Types.request_body(),
  Qdrant.Types.request_options()
) :: Qdrant.Types.result()
@spec recover_shard_from_snapshot(
  String.t(),
  integer(),
  Qdrant.Types.request_body(),
  boolean() | nil,
  String.t() | nil
) :: Qdrant.Types.result()

recover_shard_from_uploaded_snapshot(collection_name, shard_id, snapshot_data)

@spec recover_shard_from_uploaded_snapshot(String.t(), integer(), binary()) ::
  Qdrant.Types.result()

recover_shard_from_uploaded_snapshot(client, collection_name, shard_id, snapshot_data)

@spec recover_shard_from_uploaded_snapshot(
  Qdrant.Client.t(),
  String.t(),
  integer(),
  binary()
) ::
  Qdrant.Types.result()
@spec recover_shard_from_uploaded_snapshot(
  String.t(),
  integer(),
  binary(),
  Qdrant.Types.request_options() | boolean() | nil
) :: Qdrant.Types.result()

recover_shard_from_uploaded_snapshot(client, collection_name, shard_id, snapshot_data, opts)

@spec recover_shard_from_uploaded_snapshot(
  Qdrant.Client.t(),
  String.t(),
  integer(),
  binary(),
  Qdrant.Types.request_options()
) :: Qdrant.Types.result()
@spec recover_shard_from_uploaded_snapshot(
  String.t(),
  integer(),
  binary(),
  boolean() | nil,
  String.t() | nil
) :: Qdrant.Types.result()

Recovers a shard from uploaded snapshot data.

Supports binary data and streamed paths in the same way as recover_from_uploaded_snapshot/4, including :filename and :checksum.

recover_shard_from_uploaded_snapshot(collection_name, shard_id, snapshot_data, wait, priority, checksum)

@spec recover_shard_from_uploaded_snapshot(
  String.t(),
  integer(),
  binary(),
  boolean() | nil,
  String.t() | nil,
  String.t() | nil
) :: Qdrant.Types.result()

recover_shard_from_uploaded_snapshot_file(collection_name, shard_id, path)

@spec recover_shard_from_uploaded_snapshot_file(String.t(), integer(), Path.t()) ::
  Qdrant.Types.result()

recover_shard_from_uploaded_snapshot_file(client, collection_name, shard_id, path)

@spec recover_shard_from_uploaded_snapshot_file(
  Qdrant.Client.t(),
  String.t(),
  integer(),
  Path.t()
) ::
  Qdrant.Types.result()
@spec recover_shard_from_uploaded_snapshot_file(
  String.t(),
  integer(),
  Path.t(),
  Qdrant.Types.request_options()
) :: Qdrant.Types.result()

recover_shard_from_uploaded_snapshot_file(client, collection_name, shard_id, path, opts)

@spec recover_shard_from_uploaded_snapshot_file(
  Qdrant.Client.t(),
  String.t(),
  integer(),
  Path.t(),
  Qdrant.Types.request_options()
) :: Qdrant.Types.result()

stream_shard_snapshot(collection_name, shard_id)

@spec stream_shard_snapshot(String.t(), integer()) :: Qdrant.Types.result(binary())

stream_shard_snapshot(client, collection_name, shard_id)

@spec stream_shard_snapshot(Qdrant.Client.t(), String.t(), integer()) ::
  Qdrant.Types.result(binary())

Streams the current state of a shard as a bounded in-memory snapshot binary.