Elastix.Snapshot.Snapshot (Elastix v0.10.0) View Source
Functions for working with snapshots.
Link to this section Summary
Functions
Creates a snapshot.
Deletes a snapshot from a repository.
If repo_name and snapshot_name is specified, will retrieve information about that snapshot. If repo_name is specified, will retrieve information about all snapshots in that repository. Otherwise, will retrieve information about all snapshots.
Restores a previously created snapshot.
If repo_name and snapshot_name is specified, will retrieve the status of that snapsot. If repo_name is specified, will retrieve the status of all snapshots in that repository. Otherwise, will retrieve the status of all snapshots.
Link to this section Functions
create(elastic_url, repo_name, snapshot_name, data \\ %{}, query_params \\ [], options \\ [])
View SourceSpecs
create(String.t(), String.t(), String.t(), Map.t(), [tuple()], Keyword.t()) :: {:ok, %HTTPoison.Response{ body: term(), headers: term(), request: term(), request_url: term(), status_code: term() }}
Creates a snapshot.
Specs
delete(String.t(), String.t(), String.t(), Keyword.t()) :: {:ok, %HTTPoison.Response{ body: term(), headers: term(), request: term(), request_url: term(), status_code: term() }}
Deletes a snapshot from a repository.
This can also be used to stop currently running snapshot and restore
operations. Snapshot deletes can be slow, so you can pass in
HTTPoison/Hackney options in an httpoison_options
keyword argument like
:recv_timeout
to wait longer.
Examples
iex> Elastix.Snapshot.Snapshot.delete("http://localhost:9200", "backups", "snapshot_123", httpoison_options: [recv_timeout: 30_000])
{:ok, %HTTPoison.Response{...}}
get(elastic_url, repo_name \\ "", snapshot_name \\ "_all", options \\ [])
View SourceSpecs
get(String.t(), String.t(), String.t(), Keyword.t()) :: {:ok, %HTTPoison.Response{ body: term(), headers: term(), request: term(), request_url: term(), status_code: term() }}
If repo_name and snapshot_name is specified, will retrieve information about that snapshot. If repo_name is specified, will retrieve information about all snapshots in that repository. Otherwise, will retrieve information about all snapshots.
restore(elastic_url, repo_name, snapshot_name, data \\ %{}, options \\ [])
View SourceSpecs
restore(String.t(), String.t(), String.t(), Map.t(), Keyword.t()) :: {:ok, %HTTPoison.Response{ body: term(), headers: term(), request: term(), request_url: term(), status_code: term() }}
Restores a previously created snapshot.
status(elastic_url, repo_name \\ "", snapshot_name \\ "", options \\ [])
View SourceSpecs
status(String.t(), String.t(), String.t(), Keyword.t()) :: {:ok, %HTTPoison.Response{ body: term(), headers: term(), request: term(), request_url: term(), status_code: term() }}
If repo_name and snapshot_name is specified, will retrieve the status of that snapsot. If repo_name is specified, will retrieve the status of all snapshots in that repository. Otherwise, will retrieve the status of all snapshots.