CockroachDB recovery

A CockroachDB cluster can stay online while individual ranges are unavailable because their Raft majority is gone.

CockroachDB divides data into ranges and replicates each range. Losing several stores or a locality can remove a range's quorum even when other SQL data remains accessible.

Understand the symptom

Cluster health is range-specific; one missing majority can isolate a subset of keyspace.

WHY

What is happening

Ranges use Raft consensus. Surviving replicas may be under-replicated, while ranges that lost a majority cannot elect a leader. Recovery prioritizes returning original stores or restoring from backups without creating conflicting cluster identities.

What you may see

Symptoms that change the recovery path.

01

SQL requests fail for certain keys

The affected table or index spans unavailable ranges.

02

Ranges have no leaseholder

No replica can serve the range normally.

03

Several nodes or a region were lost

Replica placement may have concentrated the affected range majority there.

04

Cluster shows under-replicated and unavailable ranges

Healthy ranges are rebuilding while others lack quorum.

Protect the source

Actions that can make the situation worse.

01

Wiping stores removes unique replicas

A stopped node may contain the only current copy for some ranges.

02

Forced identity changes create foreign state

Store and cluster IDs must remain aligned.

03

Partial SQL exports miss inaccessible keyspace

A successful query elsewhere does not prove the database is complete.

Do this now

Safe steps before evaluation.

01

Freeze node replacement

Do not decommission or initialize original stores.

02

Capture range and replica diagnostics

Save unavailable-range, node, locality, and log information.

03

Preserve every store directory

Snapshot or image nodes before restart or repair.

04

Protect backups and changefeeds

Retain all restore points and downstream copies while scope is determined.

NEPFOSYS process

How a data-first evaluation proceeds.

01

Range-loss mapping

NEPFOSYS correlates unavailable ranges with node stores and business tables.

02

Replica preservation

Surviving stores and cluster identity are protected.

03

Restore and SQL validation

Recovered data is checked for range, table, index, and application completeness.

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.

Can some CockroachDB data work while other data is unavailable?

Yes. Availability is decided per range, so ranges with quorum can serve while others cannot.

Should I replace lost nodes immediately?

Not before preserving original stores and mapping which ranges depend on them.

Are three replicas a backup?

No. Replication provides availability but does not replace independent backups for deletion, corruption, or multi-replica loss.

DFW local · Nationwide mail-in

Protect the device. Start with the facts.

Start my recovery case