2018-11-30 14:06:48 -05:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="basic"]
|
|
|
|
[[index-lifecycle-and-snapshots]]
|
2020-07-13 09:26:51 -04:00
|
|
|
== Restore a managed data stream or index
|
2018-11-30 14:06:48 -05:00
|
|
|
|
2020-07-13 09:26:51 -04:00
|
|
|
When you restore a managed index or a data stream with managed backing indices,
|
2020-06-05 21:55:51 -04:00
|
|
|
{ilm-init} automatically resumes executing the restored indices' policies.
|
|
|
|
A restored index's `min_age` is relative to when it was originally created or rolled over,
|
|
|
|
not its restoration time.
|
|
|
|
Policy actions are performed on the same schedule whether or not
|
|
|
|
an index has been restored from a snapshot.
|
|
|
|
If you restore an index that was accidentally deleted half way through its month long lifecycle,
|
|
|
|
it proceeds normally through the last two weeks of its lifecycle.
|
2018-11-30 14:06:48 -05:00
|
|
|
|
2020-07-13 09:26:51 -04:00
|
|
|
In some cases, you might want to prevent {ilm-init} from immediately executing
|
|
|
|
its policy on a restored index.
|
2020-06-05 21:55:51 -04:00
|
|
|
For example, if you are restoring an older snapshot you might want to
|
|
|
|
prevent it from rapidly progressing through all of its lifecycle phases.
|
|
|
|
You might want to add or update documents before it's marked read-only or shrunk,
|
|
|
|
or prevent the index from being immediately deleted.
|
2018-11-30 14:06:48 -05:00
|
|
|
|
2020-06-05 21:55:51 -04:00
|
|
|
To prevent {ilm-init} from executing a restored index's policy:
|
2018-11-30 14:06:48 -05:00
|
|
|
|
2020-06-05 21:55:51 -04:00
|
|
|
1. Temporarily <<ilm-stop,stop {ilm-init}>>. This pauses execution of _all_ {ilm-init} policies.
|
2018-11-30 14:06:48 -05:00
|
|
|
2. Restore the snapshot.
|
2020-06-05 21:55:51 -04:00
|
|
|
3. <<ilm-remove-policy,Remove the policy>> from the index or perform whatever actions you need to
|
|
|
|
before {ilm-init} resumes policy execution.
|
|
|
|
4. <<ilm-start,Restart {ilm-init}>> to resume policy execution.
|