| 1 |
package Search::Elasticsearch::Client::1_0::Direct::Snapshot; |
| 2 |
$Search::Elasticsearch::Client::1_0::Direct::Snapshot::VERSION = '6.81'; |
| 3 |
use Moo; |
| 4 |
with 'Search::Elasticsearch::Client::1_0::Role::API'; |
| 5 |
with 'Search::Elasticsearch::Role::Client::Direct'; |
| 6 |
__PACKAGE__->_install_api('snapshot'); |
| 7 |
|
| 8 |
1; |
| 9 |
|
| 10 |
=pod |
| 11 |
|
| 12 |
=encoding UTF-8 |
| 13 |
|
| 14 |
=head1 NAME |
| 15 |
|
| 16 |
Search::Elasticsearch::Client::1_0::Direct::Snapshot - A client for managing snapshot/restore |
| 17 |
|
| 18 |
=head1 VERSION |
| 19 |
|
| 20 |
version 6.81 |
| 21 |
|
| 22 |
=head1 DESCRIPTION |
| 23 |
|
| 24 |
This module provides methods to manage snapshot/restore, or backups. |
| 25 |
It can create, get and delete configured backup repositories, and |
| 26 |
create, get, delete and restore snapshots of your cluster or indices. |
| 27 |
|
| 28 |
It does L<Search::Elasticsearch::Role::Client::Direct>. |
| 29 |
|
| 30 |
=head1 METHODS |
| 31 |
|
| 32 |
=head2 C<create_repository()> |
| 33 |
|
| 34 |
$e->snapshot->create_repository( |
| 35 |
repository => 'repository', # required |
| 36 |
body => { defn } # required |
| 37 |
); |
| 38 |
|
| 39 |
Create a repository for backups. |
| 40 |
|
| 41 |
Query string parameters: |
| 42 |
C<master_timeout>, |
| 43 |
C<timeout>, |
| 44 |
C<verify> |
| 45 |
|
| 46 |
See the L<"snapshot/restore docs"|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshot.html> |
| 47 |
for more information. |
| 48 |
|
| 49 |
=head2 C<get_repository()> |
| 50 |
|
| 51 |
$e->snapshot->get_repository( |
| 52 |
repository => 'repository' | \@repositories # optional |
| 53 |
); |
| 54 |
|
| 55 |
Retrieve existing repositories. |
| 56 |
|
| 57 |
Query string parameters: |
| 58 |
C<local>, |
| 59 |
C<master_timeout> |
| 60 |
|
| 61 |
See the L<"snapshot/restore docs"|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshot.html> |
| 62 |
for more information. |
| 63 |
|
| 64 |
=head2 C<verify_repository()> |
| 65 |
|
| 66 |
$e->snapshot->verify_repository( |
| 67 |
repository => 'repository' # required |
| 68 |
); |
| 69 |
|
| 70 |
Verify existing repository. |
| 71 |
|
| 72 |
Query string parameters: |
| 73 |
C<master_timeout>, |
| 74 |
C<timeout> |
| 75 |
|
| 76 |
See the L<"snapshot/restore docs"|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshot.html> |
| 77 |
for more information. |
| 78 |
|
| 79 |
=head2 C<delete_repository()> |
| 80 |
|
| 81 |
$e->snapshot->delete_repository( |
| 82 |
repository => 'repository' | \@repositories # required |
| 83 |
); |
| 84 |
|
| 85 |
Delete repositories by name. |
| 86 |
|
| 87 |
Query string parameters: |
| 88 |
C<master_timeout>, |
| 89 |
C<timeout> |
| 90 |
|
| 91 |
See the L<"snapshot/restore docs"|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshot.html> |
| 92 |
for more information. |
| 93 |
|
| 94 |
=head2 C<create()> |
| 95 |
|
| 96 |
$e->snapshot->create( |
| 97 |
repository => 'repository', # required |
| 98 |
snapshot => 'snapshot', # required, |
| 99 |
|
| 100 |
body => { snapshot defn } # optional |
| 101 |
); |
| 102 |
|
| 103 |
Create a snapshot of the whole cluster or individual indices in the named |
| 104 |
repository. |
| 105 |
|
| 106 |
Query string parameters: |
| 107 |
C<master_timeout>, |
| 108 |
C<wait_for_completion> |
| 109 |
|
| 110 |
=head2 C<get()> |
| 111 |
|
| 112 |
$e->snapshot->get( |
| 113 |
repository => 'repository' # required |
| 114 |
snapshot => 'snapshot' | \@snapshots # required |
| 115 |
); |
| 116 |
|
| 117 |
Retrieve snapshots in the named repository. |
| 118 |
|
| 119 |
Query string parameters: |
| 120 |
C<master_timeout> |
| 121 |
|
| 122 |
See the L<"snapshot/restore docs"|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshot.html> |
| 123 |
for more information. |
| 124 |
|
| 125 |
=head2 C<delete()> |
| 126 |
|
| 127 |
$e->snapshot->delete( |
| 128 |
repository => 'repository', # required |
| 129 |
snapshot => 'snapshot' # required |
| 130 |
); |
| 131 |
|
| 132 |
Delete snapshot in the named repository. |
| 133 |
|
| 134 |
Query string parameters: |
| 135 |
C<master_timeout> |
| 136 |
|
| 137 |
See the L<"snapshot/restore docs"|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshot.html> |
| 138 |
for more information. |
| 139 |
|
| 140 |
=head2 C<restore()> |
| 141 |
|
| 142 |
$e->snapshot->restore( |
| 143 |
repository => 'repository', # required |
| 144 |
snapshot => 'snapshot' # required |
| 145 |
|
| 146 |
body => { what to restore } # optional |
| 147 |
); |
| 148 |
|
| 149 |
Restore a named snapshot. |
| 150 |
|
| 151 |
Query string parameters: |
| 152 |
C<master_timeout>, |
| 153 |
C<wait_for_completion> |
| 154 |
|
| 155 |
See the L<"snapshot/restore docs"|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshot.html> |
| 156 |
for more information. |
| 157 |
|
| 158 |
=head2 C<status()> |
| 159 |
|
| 160 |
$result = $e->snapshot->status( |
| 161 |
repository => 'repository', # optional |
| 162 |
snapshot => 'snapshot' | \@snapshots # optional |
| 163 |
); |
| 164 |
|
| 165 |
Returns status information about the specified snapshots. |
| 166 |
|
| 167 |
Query string parameters: |
| 168 |
C<master_timeout> |
| 169 |
|
| 170 |
See the L<"snapshot/restore docs"|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshot.html> |
| 171 |
for more information. |
| 172 |
|
| 173 |
=head1 AUTHOR |
| 174 |
|
| 175 |
Enrico Zimuel <[email protected]> |
| 176 |
|
| 177 |
=head1 COPYRIGHT AND LICENSE |
| 178 |
|
| 179 |
This software is Copyright (c) 2020 by Elasticsearch BV. |
| 180 |
|
| 181 |
This is free software, licensed under: |
| 182 |
|
| 183 |
The Apache License, Version 2.0, January 2004 |
| 184 |
|
| 185 |
=cut |
| 186 |
|
| 187 |
__END__ |
| 188 |
|
| 189 |
# ABSTRACT: A client for managing snapshot/restore |
| 190 |
|