ilm-and-snapshots.asciidoc 1.8 KB

123456789101112131415161718192021222324252627282930313233
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[index-lifecycle-and-snapshots]]
  4. == Restoring snapshots of managed indices
  5. When restoring a snapshot that contains indices managed by Index Lifecycle
  6. Management, the lifecycle will automatically continue to execute after the
  7. snapshot is restored. Notably, the `min_age` is relative to the original
  8. creation or rollover of the index, rather than when the index was restored. For
  9. example, a monthly index that is restored partway through its lifecycle after an
  10. accidental deletion will be continue through its lifecycle as expected: The
  11. index will be shrunk, reallocated to different nodes, or deleted on the same
  12. schedule whether or not it has been restored from a snapshot.
  13. However, there may be cases where you need to restore an index from a snapshot,
  14. but do not want it to automatically continue through its lifecycle, particularly
  15. if the index would rapidly progress through lifecycle phases due to its age. For
  16. example, you may wish to add or update documents in an index before it is marked
  17. read only or shrunk, or prevent an index from automatically being deleted.
  18. To stop lifecycle policy execution on an index restored from a snapshot, before
  19. restoring the snapshot, <<start-stop-ilm,lifecycle policy execution can be
  20. paused>> to allow the policy to be removed.
  21. For example, the following workflow can be used in the above situation to
  22. prevent the execution of the lifecycle policy for an index:
  23. 1. Pause execution of all lifecycle policies using the <<ilm-stop,Stop ILM API>>
  24. 2. Restore the snapshot.
  25. 3. Perform whatever operations you wish before resuming lifecycle execution, or
  26. remove the lifecycle policy from the index using the
  27. <<ilm-remove-policy,Remove Policy from Index API>>
  28. 4. Resume execution of lifecycle policies using the <<ilm-start,Start ILM API>>