podman import error: archive is not a valid OCI image
0 reputation · 17 May 2021, 09:44 UTC
Problem Context
When restoring a container backup with podman import, the process will abort with the message archive is not a valid OCI image if the tarball lacks a proper OCI layout. This error is a clear indication that the backup archive is corrupted or incomplete.
Goal and Constraints
The primary aim is to verify that a restored image is byte‑for‑byte identical to the source, while also ensuring that all OCI annotations and labels survive the backup/restore cycle. Two constraints complicate this:
- Podman does not perform automatic checksum verification during
importorload; users must compute and compare hashes manually. - When an exported container tarball created by a newer Podman release is imported, the tool may drop or alter OCI annotations and labels, and the documentation does not specify the mapping rules.
Unresolved Decision
It remains unclear how metadata preservation behaves across major Podman versions, and whether the import process can be made to enforce integrity checks automatically.
Specific Questions
- How can we guarantee that OCI annotations and labels are retained when importing a backup created with a newer Podman release?
- Does Podman offer any built‑in checksum verification during
importorload, or must this be handled externally? - What pre‑import validation steps can detect an incomplete or corrupted archive before the import process begins?