\ElasticaSnapshot

Class Snapshot.

Summary

Methods
Properties
Constants
__construct()
registerRepository()
getRepository()
getAllRepositories()
createSnapshot()
getSnapshot()
getAllSnapshots()
deleteSnapshot()
restoreSnapshot()
request()
No public properties found
No constants found
No protected methods found
$_client
N/A
No private methods found
No private properties found
N/A

Properties

Methods

__construct()

__construct(\Elastica\Client  $client) 

Parameters

\Elastica\Client $client

registerRepository()

registerRepository(string  $name, string  $type, array  $settings = array()) : \Elastica\Response

Register a snapshot repository.

Parameters

string $name

the name of the repository

string $type

the repository type ("fs" for file system)

array $settings

Additional repository settings. If type "fs" is used, the "location" setting must be provided.

Returns

\Elastica\Response

getRepository()

getRepository(string  $name) : array

Retrieve a repository record by name.

Parameters

string $name

the name of the desired repository

Throws

\Elastica\Exception\ResponseException
\Elastica\Exception\NotFoundException

Returns

array

getAllRepositories()

getAllRepositories() : array

Retrieve all repository records.

Returns

array

createSnapshot()

createSnapshot(string  $repository, string  $name, array  $options = array(), boolean  $waitForCompletion = false) : \Elastica\Response

Create a new snapshot.

Parameters

string $repository

the name of the repository in which this snapshot should be stored

string $name

the name of this snapshot

array $options

optional settings for this snapshot

boolean $waitForCompletion

if true, the request will not return until the snapshot operation is complete

Returns

\Elastica\Response

getSnapshot()

getSnapshot(string  $repository, string  $name) : array

Retrieve data regarding a specific snapshot.

Parameters

string $repository

the name of the repository from which to retrieve the snapshot

string $name

the name of the desired snapshot

Throws

\Elastica\Exception\ResponseException
\Elastica\Exception\NotFoundException

Returns

array

getAllSnapshots()

getAllSnapshots(string  $repository) : array

Retrieve data regarding all snapshots in the given repository.

Parameters

string $repository

the repository name

Returns

array

deleteSnapshot()

deleteSnapshot(string  $repository, string  $name) : \Elastica\Response

Delete a snapshot.

Parameters

string $repository

the repository in which the snapshot resides

string $name

the name of the snapshot to be deleted

Returns

\Elastica\Response

restoreSnapshot()

restoreSnapshot(string  $repository, string  $name, array  $options = array(), boolean  $waitForCompletion = false) : \Elastica\Response

Restore a snapshot.

Parameters

string $repository

the name of the repository

string $name

the name of the snapshot

array $options

options for the restore operation

boolean $waitForCompletion

if true, the request will not return until the restore operation is complete

Returns

\Elastica\Response

request()

request(string  $path, string  $method = \Elastica\Request::GET, array  $data = array(), array  $query = array()) : \Elastica\Response

Perform a snapshot request.

Parameters

string $path

the URL

string $method

the HTTP method

array $data

request body data

array $query

query string parameters

Returns

\Elastica\Response