repository-read-only-url.asciidoc 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. [[snapshots-read-only-repository]]
  2. === Read-only URL repository
  3. include::{es-repo-dir}/snapshot-restore/on-prem-repo-type.asciidoc[]
  4. You can use a URL repository to give a cluster read-only access to a shared file
  5. system. Since URL repositories are always read-only, they're a safer and more
  6. convenient alternative to registering a read-only shared filesystem repository.
  7. Use {kib} or the <<put-snapshot-repo-api,create snapshot repository API>> to
  8. register a URL repository.
  9. [source,console]
  10. ----
  11. PUT _snapshot/my_read_only_url_repository
  12. {
  13. "type": "url",
  14. "settings": {
  15. "url": "file:/mount/backups/my_fs_backup_location"
  16. }
  17. }
  18. ----
  19. // TEST[skip:no access to url file path]
  20. [[read-only-url-repository-settings]]
  21. ==== Repository settings
  22. `chunk_size`::
  23. (Optional, <<byte-units,byte value>>)
  24. Maximum size of files in snapshots. In snapshots, files larger than this are
  25. broken down into chunks of this size or smaller. Defaults to `null` (unlimited
  26. file size).
  27. `http_max_retries`::
  28. (Optional, integer) Maximum number of retries for `http` and `https` URLs.
  29. Defaults to `5`.
  30. `http_socket_timeout`::
  31. (Optional, <<time-units,time value>>) Maximum wait time for data transfers over
  32. a connection. Defaults to `50s`.
  33. `compress`::
  34. (Optional, Boolean)
  35. If `true`, metadata files, such as index mappings and settings, are compressed
  36. in snapshots. Data files are not compressed. Defaults to `true`.
  37. `max_number_of_snapshots`::
  38. (Optional, integer)
  39. Maximum number of snapshots the repository can contain.
  40. Defaults to `Integer.MAX_VALUE`, which is `2^31-1` or `2147483647`.
  41. include::repository-shared-settings.asciidoc[tags=!readonly-repo-setting]
  42. `url`::
  43. +
  44. --
  45. (Required, string)
  46. URL location of the root of the shared filesystem repository. The following
  47. protocols are supported:
  48. * `file`
  49. * `ftp`
  50. * `http`
  51. * `https`
  52. * `jar`
  53. URLs using the `http`, `https`, or `ftp` protocols must be explicitly allowed
  54. with the <<repositories-url-allowed,`repositories.url.allowed_urls`>> cluster
  55. setting. This setting supports wildcards in the place of a host, path, query, or
  56. fragment in the URL.
  57. URLs using the `file` protocol must point to the location of a shared filesystem
  58. accessible to all master and data nodes in the cluster. This location must be
  59. registered in the `path.repo` setting. You don't need to register URLs using the
  60. `ftp`, `http`, `https`, or `jar` protocols in the `path.repo` setting.
  61. --