Docker overlay2 recovery

Docker overlay2 damage can hide a container's writable layer even when portions of its files remain on the host disk.

The overlay2 driver combines read-only image layers with a writable upper layer. Damage to layer directories, link metadata, the backing file system, or Docker's state database can make containers disappear or fail to start.

Understand the symptom

overlay2 depends on lower, upper, work, merged, diff, and link relationships.

WHY

What is happening

Docker documents image layers as lower directories and each container's writable content as an upper directory. Direct manipulation is unsupported; a storage-driver change can make existing layers inaccessible even when their bytes remain present.

What you may see

Symptoms that change the recovery path.

01

Containers vanished after reboot

Docker metadata may no longer map container IDs to layer directories.

02

Invalid argument mounting overlay

Layer relationships or the backing file system may be inconsistent.

03

Missing lower layer

A referenced layer directory or link entry is absent.

04

Container starts without recent files

The expected writable upper layer may not be attached.

Protect the source

Actions that can make the situation worse.

01

docker system prune deletes evidence

Unused-looking layers may contain the only recent application data.

02

Driver changes hide old storage

Switching storage drivers makes prior images and containers inaccessible.

03

Direct edits break relationships

Renaming overlay2 directories can detach layers from metadata.

Do this now

Safe steps before evaluation.

01

Stop Docker cleanly

Prevent new pulls, starts, commits, cleanup jobs, and layer writes.

02

Capture the Docker root

Preserve metadata, overlay2, containerd state, volumes, logs, and file ownership.

03

Collect deployment definitions

Keep Compose, Swarm, Kubernetes, environment, secrets references, and image digests.

04

Separate persistent data

Identify volumes, bind mounts, and files written only inside container layers.

NEPFOSYS process

How a data-first evaluation proceeds.

01

Storage-driver inventory

NEPFOSYS maps Docker metadata, layer IDs, lower chains, upper directories, and host health.

02

Copy-based layer extraction

Readable upper-layer and volume content is collected without starting the original containers.

03

Application validation

Recovered databases, uploads, configurations, permissions, and expected paths are verified.

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.

Are Docker volumes inside overlay2?

Named volumes are normally stored separately, but bind mounts and writable-layer data require different paths.

Can I reinstall Docker and point it to the old directory?

That can overwrite metadata or create a new state. Preserve the original root first.

Why not copy the merged directory?

Merged is a mounted view; it may be unavailable or incomplete after failure. Source layers and metadata provide better evidence.

DFW local · Nationwide mail-in

Protect the device. Start with the facts.

Start my recovery case