Read-only URL repository
Self-Managed
This repository type is only available if you run Elasticsearch on your own hardware. If you use Elastic Cloud Hosted, see Elastic Cloud Hosted repository types.
You can use a URL repository to give a cluster read-only access to a shared file system. Since URL repositories are always read-only, they’re a safer and more convenient alternative to registering a read-only shared filesystem repository.
Use Kibana or the create snapshot repository API to register a URL repository.
PUT _snapshot/my_read_only_url_repository
{
"type": "url",
"settings": {
"url": "file:/mount/backups/my_fs_backup_location"
}
}
chunk_size- (Optional, byte value) Maximum size of files in snapshots. In snapshots, files larger than this are broken down into chunks of this size or smaller. Defaults to
null(unlimited file size). http_max_retries- (Optional, integer) Maximum number of retries for
httpandhttpsURLs. Defaults to5. http_socket_timeout- (Optional, time value) Maximum wait time for data transfers over a connection. Defaults to
50s. compress- (Optional, Boolean) If
true, metadata files, such as index mappings and settings, are compressed in snapshots. Data files are not compressed. Defaults totrue. max_number_of_snapshots- (Optional, integer) Maximum number of snapshots the repository can contain. Defaults to
Integer.MAX_VALUE, which is231-1or2147483647. max_restore_bytes_per_sec- (Optional, byte value) Maximum snapshot restore rate per node. Defaults to unlimited. Note that restores are also throttled through recovery settings.
max_snapshot_bytes_per_sec- (Optional, byte value) Maximum snapshot creation rate per node. Defaults to
40mbper second. Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. url-
(Required, string) URL location of the root of the shared filesystem repository. The following protocols are supported:
fileftphttphttpsjar
URLs using the
http,https, orftpprotocols must be explicitly allowed with therepositories.url.allowed_urlscluster setting. This setting supports wildcards in the place of a host, path, query, or fragment in the URL.URLs using the
fileprotocol must point to the location of a shared filesystem accessible to all master and data nodes in the cluster. This location must be registered in thepath.reposetting, in the same way as when configuring a shared filesystem repository, and it must contain the snapshot data. You don’t need to setpath.repowhen using URLs with theftp,http,https, orjarprotocols.