Prometheus TSDB recovery

Prometheus TSDB stores completed time ranges in blocks and protects the current in-memory head with a write-ahead log.

Each Prometheus block contains chunks, an index, metadata, and optional tombstones. The WAL and checkpoints protect recent samples not yet compacted into a block. Deleting either can make the service start at the cost of data loss.

Understand the symptom

Block time ranges and compaction parents establish history; WAL segments establish the current head.

WHY

What is happening

A damaged block index can hide valid chunk bytes, while a damaged chunk segment can affect selected series. Overlapping replacement blocks, tombstones, labels, and compaction lineage must be validated before reintroduction.

What you may see

Symptoms that change the recovery path.

01

WAL segment corrupt

Startup replay stops on an invalid record or checksum.

02

Block index error

Series postings or label references cannot be decoded.

03

Chunk checksum failure

Samples in one segment or series range are damaged.

04

Queries have missing windows

A block or head range may be absent.

Protect the source

Actions that can make the situation worse.

01

Deleting WAL loses newest samples

Back it up before any last-resort action.

02

Removing a block loses its time range

Preserve chunks even if the index fails.

03

Compaction changes lineage

Keep original blocks and parent metadata.

Do this now

Safe steps before evaluation.

01

Stop Prometheus

Prevent compaction, retention, and WAL changes.

02

Snapshot the complete TSDB

Keep blocks, WAL, checkpoints, tombstones, and metadata.

03

Save configuration and version

Record flags, retention, external labels, and remote-write state.

04

Collect remote copies

Long-term storage or remote-write receivers may hold missing samples.

NEPFOSYS process

How a data-first evaluation proceeds.

01

Timeline map

NEPFOSYS maps block ULIDs, time ranges, compaction lineage, WAL, and checkpoints.

02

Series extraction

Readable index, chunk, and WAL records are decoded from copies.

03

Metric validation

Labels, timestamps, samples, gaps, overlaps, and remote copies are compared.

A clear next step

Preserve the original device before another repair or recovery attempt.

Start a case with the exact symptoms, incident timeline, prior attempts, encryption details, and the files that matter most. NEPFOSYS will route the case to the appropriate DFW intake or nationwide mail-in path.

Start with a case review

Questions, answered

What customers ask before starting.

Will deleting the WAL fix startup?

It may allow startup but discards recent data represented only in the WAL.

Can chunks survive a bad index?

Potentially, though series-to-chunk relationships must be reconstructed.

Can remote write help?

Yes. A receiver may contain samples absent from local TSDB storage.

DFW local · Nationwide mail-in

Protect the device. Start with the facts.

Start my recovery case