delete-snapshot.asciidoc 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. [[delete-snapshots]]
  2. == Delete a snapshot
  3. ////
  4. [source,console]
  5. -----------------------------------
  6. PUT /_snapshot/my_backup
  7. {
  8. "type": "fs",
  9. "settings": {
  10. "location": "my_backup_location"
  11. }
  12. }
  13. PUT /_snapshot/my_backup/snapshot_1?wait_for_completion=true
  14. PUT /_snapshot/my_backup/snapshot_2?wait_for_completion=true
  15. PUT /_snapshot/my_backup/snapshot_3?wait_for_completion=true
  16. -----------------------------------
  17. // TESTSETUP
  18. ////
  19. Use the <<delete-snapshot-api,delete snapshot API>> to delete a snapshot
  20. from the repository:
  21. [source,console]
  22. ----
  23. DELETE /_snapshot/my_backup/snapshot_1
  24. ----
  25. When a snapshot is deleted from a repository, {es} deletes all files associated with the
  26. snapshot that are not in-use by other snapshots.
  27. If the delete snapshot operation starts while the snapshot is being
  28. created, the snapshot process halts and all files created as part of the snapshotting process are
  29. removed. Use the <<delete-snapshot-api,Delete snapshot API>> to cancel long running snapshot operations that were
  30. started by mistake.
  31. To delete multiple snapshots from a repository, separate snapshot names by commas or use wildcards:
  32. [source,console]
  33. -----------------------------------
  34. DELETE /_snapshot/my_backup/snapshot_2,snapshot_3
  35. DELETE /_snapshot/my_backup/snap*
  36. -----------------------------------