IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Repository settings
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Repository settings
editThe Azure repository supports following settings:
-
client -
Azure named client to use. Defaults to
default. -
container -
Container name. You must create the azure container before creating the repository.
Defaults to
elasticsearch-snapshots. -
base_path - Specifies the path within container to repository data. Defaults to empty (root directory).
-
chunk_size -
Big files can be broken down into chunks during snapshotting if needed.
The chunk size can be specified in bytes or by using size value notation,
i.e.
1g,10m,5k. Defaults to64m(64m max) -
compress -
When set to
truemetadata files are stored in compressed format. This setting doesn’t affect index files that are already compressed by default. Defaults tofalse. -
max_restore_bytes_per_sec -
Throttles per node restore rate. Defaults to
40mbper second. -
max_snapshot_bytes_per_sec -
Throttles per node snapshot rate. Defaults to
40mbper second. -
readonly -
Makes repository read-only. Defaults to
false. -
location_mode -
primary_onlyorsecondary_only. Defaults toprimary_only. Note that if you set it tosecondary_only, it will forcereadonlyto true.
Some examples, using scripts:
# The simplest one
PUT _snapshot/my_backup1
{
"type": "azure"
}
# With some settings
PUT _snapshot/my_backup2
{
"type": "azure",
"settings": {
"container": "backup-container",
"base_path": "backups",
"chunk_size": "32m",
"compress": true
}
}
# With two accounts defined in elasticsearch.yml (my_account1 and my_account2)
PUT _snapshot/my_backup3
{
"type": "azure",
"settings": {
"client": "secondary"
}
}
PUT _snapshot/my_backup4
{
"type": "azure",
"settings": {
"client": "secondary",
"location_mode": "primary_only"
}
}
Example using Java:
client.admin().cluster().preparePutRepository("my_backup_java1")
.setType("azure").setSettings(Settings.builder()
.put(Storage.CONTAINER, "backup-container")
.put(Storage.CHUNK_SIZE, new ByteSizeValue(32, ByteSizeUnit.MB))
).get();