x-pack/platform/plugins/private/snapshot_restore/README.md
path:
repo: /tmp/es-backups
or
yarn es snapshot --license=trial -E path.repo=/tmp/es-backups
location setting:PUT /_snapshot/my_backup
{
"type": "fs",
"settings": {
"location": "/tmp/es-backups",
"chunk_size": "10mb"
}
}
settings as necessary, all available settings can be found in docs:
https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html#_shared_file_system_repositoryReadonly repositories only take url setting. Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html#_read_only_url_repository
It's easy to set up a file: url:
PUT _snapshot/my_readonly_repository
{
"type": "url",
"settings": {
"url": "file:///tmp/es-backups"
}
}
Source only repositories are special in that they are basically a wrapper around another repository type. Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html#_source_only_repository
This means that the settings that are available depends on the delegate_type parameter. For example, this source only repository delegates to fs (file system) type, so all file system rules and available settings apply:
PUT _snapshot/my_src_only_repository
{
"type" : "source",
"settings" : {
"delegate_type" : "fs",
"location" : "/tmp/es-backups"
}
}
There is one official repository plugin available: HDFS. You can find the repository settings in the docs: https://www.elastic.co/guide/en/elasticsearch/plugins/master/repository-hdfs-config.html.
To run ES with plugins:
yarn es snapshot from the Kibana directory like normal, then exit out of process.cd .es/8.0.0bin/elasticsearch-plugin install https://snapshots.elastic.co/downloads/elasticsearch-plugins/repository-hdfs/repository-hdfs-8.0.0-SNAPSHOT.zipbin/elasticsearch from the .es/8.0.0 directory. Otherwise, starting ES with yarn es snapshot would overwrite the plugins you just installed.Snapshot lifecycle management (SLM) status is "RUNNING" by default, but it can be stoped manually (for mantenaince purpouses, for instance). When this happens, no schedule snapshots will be taken. Docs: https://www.elastic.co/guide/en/elasticsearch/reference/master/snapshot-lifecycle-management-api.html
GET _slm/statusPOST /_slm/startPOST /_slm/stop