NATS JetStream recovery

JetStream recovery must reconcile stored messages, stream sequence state, consumer progress, replicas, and server identity.

NATS JetStream persists stream messages and state, tracks durable consumers and acknowledgements, and can replicate data across servers. A damaged file store, lost metadata leader, wrong encryption key, incomplete snapshot, or missing replica can make streams vanish or return inconsistent sequence ranges.

Understand the symptom

Stream data and consumer state have different recovery meaning even when both use replicated JetStream storage.

WHY

What is happening

A stream records subjects, messages, byte counts, first and last sequences, while each consumer tracks delivery and acknowledgement progress. File-store copies must be interpreted with stream metadata, replica placement, server identity, cluster state, and any at-rest encryption context.

What you may see

Symptoms that change the recovery path.

01

Stream missing after restart

The server may use a different store path, identity, account, domain, metadata state, or encryption key.

02

Message or block error

A file-store block, index, checksum, or storage device may be damaged.

03

No stream leader

Replica quorum or JetStream cluster metadata is unavailable.

04

Consumer sequence changed

Consumer state, acknowledgement progress, or restored snapshot time differs from the stream.

Protect the source

Actions that can make the situation worse.

01

Purge or delete removes evidence

Freeze retention and administrative changes before investigation.

02

New peers can replace old state

Snapshot every member before cluster repair or reconfiguration.

03

Copying one node may be incomplete

Streams, consumers, metadata, and replicas can be distributed across servers.

Do this now

Safe steps before evaluation.

01

Quiesce publishers and consumers

Prevent new messages, acknowledgements, retention deletes, and redelivery changes.

02

Snapshot every store directory

Preserve all nodes, volumes, file-store objects, Raft state, and filesystem metadata.

03

Record cluster identity

Save server names, routes, domains, accounts, stream placement, replicas, leaders, and exact versions.

04

Collect snapshots and monitoring output

Keep stream reports, /jsz evidence, advisories, configs, logs, and known-good exports.

NEPFOSYS process

How a data-first evaluation proceeds.

01

Cluster-state inventory

NEPFOSYS correlates servers, streams, consumers, sequences, replicas, leaders, storage paths, and snapshots.

02

Copy-based store analysis

Readable messages and state are mapped without altering the live cluster or source volumes.

03

Delivery-state validation

Subjects, message sequences, timestamps, payloads, consumer progress, acknowledgements, and expected counts are reconciled.

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.

Does a stream snapshot include consumer state?

Snapshot scope and tool version matter; preserve and verify the snapshot plus the original stores before relying on it.

Can another replica supply the data?

Possibly, when it retains a healthy, sufficiently current copy and cluster identity remains consistent.

Why can the wrong key make streams disappear?

JetStream at-rest encryption needs the matching key to decrypt stored metadata and data.

DFW local · Nationwide mail-in

Protect the device. Start with the facts.

Start my recovery case