index.asciidoc 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[snapshot-lifecycle-management]]
  4. == Manage the snapshot lifecycle
  5. You can set up snapshot lifecycle policies to automate the timing, frequency, and retention of snapshots.
  6. Snapshot policies can apply to multiple data streams and indices.
  7. The snapshot lifecycle management (SLM) <<snapshot-lifecycle-management-api, CRUD APIs>> provide
  8. the building blocks for the snapshot policy features that are part of the Management application in {kib}.
  9. The Snapshot and Restore UI makes it easy to set up policies, register snapshot repositories,
  10. view and manage snapshots, and restore data streams or indices.
  11. You can stop and restart SLM to temporarily pause automatic backups while performing
  12. upgrades or other maintenance.
  13. [discrete]
  14. [[slm-and-security]]
  15. === Security and SLM
  16. Two built-in cluster privileges control access to the SLM actions when
  17. {es} {security-features} are enabled:
  18. `manage_slm`:: Allows a user to perform all SLM actions, including creating and updating policies
  19. and starting and stopping SLM.
  20. `read_slm`:: Allows a user to perform all read-only SLM actions,
  21. such as getting policies and checking the SLM status.
  22. `cluster:admin/snapshot/*`:: Allows a user to take and delete snapshots of any
  23. index, whether or not they have access to that index.
  24. For example, the following request configures an `slm-admin` role that grants the privileges
  25. necessary for administering SLM.
  26. [source,console]
  27. -----------------------------------
  28. POST /_security/role/slm-admin
  29. {
  30. "cluster": ["manage_slm", "cluster:admin/snapshot/*"],
  31. "indices": [
  32. {
  33. "names": [".slm-history-*"],
  34. "privileges": ["all"]
  35. }
  36. ]
  37. }
  38. -----------------------------------
  39. // TEST[skip:security is not enabled here]
  40. Or, for a read-only role that can retrieve policies (but not update, execute, or
  41. delete them), as well as only view the history index:
  42. [source,console]
  43. -----------------------------------
  44. POST /_security/role/slm-read-only
  45. {
  46. "cluster": ["read_slm"],
  47. "indices": [
  48. {
  49. "names": [".slm-history-*"],
  50. "privileges": ["read"]
  51. }
  52. ]
  53. }
  54. -----------------------------------
  55. // TEST[skip:security is not enabled here]
  56. include::getting-started-slm.asciidoc[]
  57. include::slm-retention.asciidoc[]