LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

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 and writes it to stdout by default. Unlike podman save, it exports the container filesystem as a flat tar (without image layer history or metadata).The result can be imported with podman import to create a new image.

PARAMETERS

-o, --output file

Write to a file instead of stdout.
-h, --help
Print usage statement.

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

Copied to clipboard
Kai