snapshots.asciidoc 1.8 KB

12345678910111213141516171819202122232425262728293031323334
  1. [[cat-snapshots]]
  2. == cat snapshots
  3. The `snapshots` command shows all snapshots that belong to a specific repository.
  4. To find a list of available repositories to query, the command `/_cat/repositories` can be used.
  5. Querying the snapshots of a repository named `repo1` then looks as follows.
  6. [source,js]
  7. --------------------------------------------------
  8. GET /_cat/snapshots/repo1?v&s=id
  9. --------------------------------------------------
  10. // CONSOLE
  11. // TEST[s/^/PUT \/_snapshot\/repo1\/snap1?wait_for_completion=true\n/]
  12. // TEST[s/^/PUT \/_snapshot\/repo1\/snap2?wait_for_completion=true\n/]
  13. // TEST[s/^/PUT \/_snapshot\/repo1\n{"type": "fs", "settings": {"location": "repo\/1"}}\n/]
  14. Which looks like:
  15. [source,txt]
  16. --------------------------------------------------
  17. id status start_epoch start_time end_epoch end_time duration indices successful_shards failed_shards total_shards
  18. snap1 FAILED 1445616705 18:11:45 1445616978 18:16:18 4.6m 1 4 1 5
  19. snap2 SUCCESS 1445634298 23:04:58 1445634672 23:11:12 6.2m 2 10 0 10
  20. --------------------------------------------------
  21. // TESTRESPONSE[s/FAILED/SUCCESS/ s/14456\d+/\\d+/ s/\d+(\.\d+)?(m|s|ms)/\\d+(\\.\\d+)?(m|s|ms)/]
  22. // TESTRESPONSE[s/\d+:\d+:\d+/\\d+:\\d+:\\d+/]
  23. // TESTRESPONSE[s/1 4 1 5/\\d+ \\d+ \\d+ \\d+/]
  24. // TESTRESPONSE[s/2 10 0 10/\\d+ \\d+ \\d+ \\d+/]
  25. // TESTRESPONSE[_cat]
  26. Each snapshot contains information about when it was started and stopped.
  27. Start and stop timestamps are available in two formats.
  28. The `HH:MM:SS` output is simply for quick human consumption.
  29. The epoch time retains more information, including date, and is machine sortable if the snapshot process spans days.