LinuxCommandLibrary

podman-export

Export container filesystem as tar archive

TLDR

Export container filesystem

$ podman export [container] -o [container.tar]
copy
Export to stdout
$ podman export [container] > [container.tar]
copy
Export and compress
$ podman export [container] | gzip > [container.tar.gz]
copy

SYNOPSIS

podman export [options] container

DESCRIPTION

podman export exports a container's filesystem as a tar archive. Unlike podman save, it exports the running container state, not the image layers.
The result can be imported with podman import to create a new image.

PARAMETERS

-o, --output file

Output file path.

EXAMPLES

$ # Export to file
podman export mycontainer -o backup.tar

# Export running container
podman export $(podman ps -lq) > latest.tar

# Compress while exporting
podman export webserver | gzip > webserver.tar.gz

# Export and import as new image
podman export mycontainer | podman import - myimage:latest
copy

EXPORT VS SAVE

$ podman export - Container filesystem (flat)
podman save  - Image layers (preserves history)
copy

CAVEATS

Loses image metadata and history. Only exports filesystem. Use podman save for image preservation.

HISTORY

podman export is part of Podman, providing Docker-compatible container export functionality in a daemonless architecture.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community