index.asciidoc 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. [[snapshot-restore]]
  2. = Snapshot and restore
  3. [partintro]
  4. --
  5. // tag::snapshot-intro[]
  6. A _snapshot_ is a backup taken from a running {es} cluster.
  7. You can take snapshots of an entire cluster, including all its data streams and
  8. indices. You can also take snapshots of only specific data streams or indices in
  9. the cluster.
  10. Snapshots can be stored in either local or remote repositories.
  11. Remote repositories can reside on Amazon S3, HDFS, Microsoft Azure,
  12. Google Cloud Storage,
  13. and other platforms supported by a repository plugin.
  14. Snapshots are incremental: each snapshot only stores data that
  15. is not part of an earlier snapshot.
  16. This enables you to take frequent snapshots with minimal overhead.
  17. // end::snapshot-intro[]
  18. // tag::restore-intro[]
  19. You can restore snapshots to a running cluster with the <<snapshots-restore-snapshot,restore API>>.
  20. By default, all data streams and indices in the snapshot are restored.
  21. However, you can choose to restore only the cluster state or specific data
  22. streams or indices from a snapshot.
  23. // end::restore-intro[]
  24. You must <<snapshots-register-repository, register a snapshot repository>>
  25. before you can <<snapshots-take-snapshot, take snapshots>>.
  26. You can use <<getting-started-snapshot-lifecycle-management, snapshot lifecycle management>>
  27. to automatically take and manage snapshots.
  28. // tag::backup-warning[]
  29. WARNING: You cannot back up an {es} cluster by simply copying
  30. the data directories of all of its nodes. {es} may be making changes to
  31. the contents of its data directories while it is running; copying its data
  32. directories cannot be expected to capture a consistent picture of their contents.
  33. If you try to restore a cluster from such a backup, it may fail and report
  34. corruption and/or missing files. Alternatively, it may appear to have succeeded
  35. though it silently lost some of its data. The only reliable way to back up a
  36. cluster is by using the snapshot and restore functionality.
  37. // end::backup-warning[]
  38. [float]
  39. [[snapshot-restore-version-compatibility]]
  40. === Version compatibility
  41. IMPORTANT: Version compatibility refers to the underlying Lucene index
  42. compatibility. Follow the <<setup-upgrade,Upgrade documentation>>
  43. when migrating between versions.
  44. A snapshot contains a copy of the on-disk data structures that make up an
  45. index or a data stream's backing indices. This means that snapshots can only be restored to versions of
  46. {es} that can read the indices:
  47. * A snapshot of an index created in 6.x can be restored to 7.x.
  48. * A snapshot of an index created in 5.x can be restored to 6.x.
  49. * A snapshot of an index created in 2.x can be restored to 5.x.
  50. * A snapshot of an index created in 1.x can be restored to 2.x.
  51. Conversely, snapshots of indices created in 1.x **cannot** be restored to 5.x
  52. or 6.x, snapshots of indices created in 2.x **cannot** be restored to 6.x
  53. or 7.x, and snapshots of indices created in 5.x **cannot** be restored to 7.x
  54. or 8.x.
  55. We do not recommend restoring snapshots from later {es} versions in earlier
  56. versions. In some cases, the snapshots cannot be restored. For example, a
  57. snapshot taken in 7.6.0 cannot be restored to 7.5.0.
  58. Each snapshot can contain indices created in various versions of {es}. This
  59. includes backing indices created for data streams. When restoring a snapshot, it
  60. must be possible to restore all of these indices into the target cluster. If any
  61. indices in a snapshot were created in an incompatible version, you will not be
  62. able restore the snapshot.
  63. IMPORTANT: When backing up your data prior to an upgrade, keep in mind that you
  64. won't be able to restore snapshots after you upgrade if they contain indices
  65. created in a version that's incompatible with the upgrade version.
  66. If you end up in a situation where you need to restore a snapshot of a data stream or index
  67. that is incompatible with the version of the cluster you are currently running,
  68. you can restore it on the latest compatible version and use
  69. <<reindex-from-remote,reindex-from-remote>> to rebuild the data stream or index on the current
  70. version. Reindexing from remote is only possible if the original data stream or index has
  71. source enabled. Retrieving and reindexing the data can take significantly
  72. longer than simply restoring a snapshot. If you have a large amount of data, we
  73. recommend testing the reindex from remote process with a subset of your data to
  74. understand the time requirements before proceeding.
  75. --
  76. include::register-repository.asciidoc[]
  77. include::take-snapshot.asciidoc[]
  78. include::restore-snapshot.asciidoc[]
  79. include::monitor-snapshot-restore.asciidoc[]
  80. include::delete-snapshot.asciidoc[]
  81. include::../slm/index.asciidoc[]