repository-source-only.asciidoc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. [[snapshots-source-only-repository]]
  2. === Source-only repository
  3. You can use a source-only repository to take minimal, source-only snapshots that
  4. use up to 50% less disk space than regular snapshots.
  5. Unlike other repository types, a source-only repository doesn't directly store
  6. snapshots. It delegates storage to another registered snapshot repository.
  7. When you take a snapshot using a source-only repository, {es} creates a
  8. source-only snapshot in the delegated storage repository. This snapshot only
  9. contains stored fields and metadata. It doesn't include index or doc values
  10. structures and isn't immediately searchable when restored. To search the
  11. restored data, you first have to <<docs-reindex,reindex>> it into a new data
  12. stream or index.
  13. [IMPORTANT]
  14. ==================================================
  15. Source-only snapshots are only supported if the `_source` field is enabled and no source-filtering is applied.
  16. When you restore a source-only snapshot:
  17. * The restored index is read-only and can only serve `match_all` search or scroll requests to enable reindexing.
  18. * Queries other than `match_all` and `_get` requests are not supported.
  19. * The mapping of the restored index is empty, but the original mapping is available from the types top
  20. level `meta` element.
  21. ==================================================
  22. Before registering a source-only repository, use {kib} or the
  23. <<put-snapshot-repo-api,create snapshot repository API>> to register a snapshot
  24. repository of another type to use for storage. Then register the source-only
  25. repository and specify the delegated storage repository in the request.
  26. [source,console]
  27. ----
  28. PUT _snapshot/my_src_only_repository
  29. {
  30. "type": "source",
  31. "settings": {
  32. "delegate_type": "fs",
  33. "location": "my_backup_repository"
  34. }
  35. }
  36. ----
  37. // TEST[setup:setup-repository]
  38. // TEST[s/my_backup_repository/my_repository/]
  39. [[source-only-repository-settings]]
  40. ==== Repository settings
  41. `chunk_size`::
  42. (Optional, <<byte-units,byte value>>)
  43. Maximum size of files in snapshots. In snapshots, files larger than this are
  44. broken down into chunks of this size or smaller. Defaults to `null` (unlimited
  45. file size).
  46. `compress`::
  47. (Optional, Boolean)
  48. If `true`, metadata files, such as index mappings and settings, are compressed
  49. in snapshots. Data files are not compressed. Defaults to `true`.
  50. `delegate_type`::
  51. (Optional, string)
  52. Delegated repository type. For valid values, see the
  53. <<put-snapshot-repo-api-request-type,`type` parameter>>.
  54. +
  55. `source` repositories can use `settings` properties for its delegated repository
  56. type. See <<snapshots-source-only-repository>>.
  57. `max_number_of_snapshots`::
  58. (Optional, integer)
  59. Maximum number of snapshots the repository can contain.
  60. Defaults to `Integer.MAX_VALUE`, which is `2^31-1` or `2147483647`.
  61. include::repository-shared-settings.asciidoc[]