capabilities.work

Take a TSDB Snapshot for Backup

A 3-step recipe with Prometheus. We can help you get access.

Recipe · 3 steps

Take a TSDB Snapshot for Backup

Create a TSDB snapshot and return its directory name.

  1. Read the runtime properties, including the working directory the snapshot will be written beneath and the storage retention in force.
  2. Read the TSDB statistics. The head block series and chunk counts are the best available estimate of how large the snapshot will be and how long it will take to write.
  3. Create the snapshot and capture the generated directory name. That name is the handle the backup job needs — nothing else in the API will report it afterwards.
What you'll need to have ready
  • skipHead: Whether to exclude the in-memory head block from the snapshot. Defaults to false; leaving it false includes the most recent, not yet persisted data at the cost
For your developer

Arazzo workflow prometheus:tsdb-snapshot-backup, 3 operations: getRuntimeInfo → getTsdbStatus → createTsdbSnapshot. Specs on APIs.io.