ElastixFork Fork v0.0.1 ElastixFork.Snapshot.Snapshot
Functions for working with snapshots.
Link to this section Summary
Functions
Creates a snapshot.
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.
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. Oterwise, 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 \\ [])
Creates a snapshot.
delete(elastic_url, repo_name, snapshot_name, options \\ [])
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> ElastixFork.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")
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. Oterwise, will retrieve information about all snapshots.
restore(elastic_url, repo_name, snapshot_name, data \\ %{})
Restores a previously created snapshot.
status(elastic_url, repo_name \\ "", snapshot_name \\ "")
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.