LinuxCommandLibrary

podman-save

TLDR

Save an image to a tar file

$ podman save [[-o|--output]] [path/to/file.tar] [image:tag]
copy

Save an image to stdout
$ podman save [image:tag] > [path/to/file.tar]
copy

Save an image with compression
$ podman save [image:tag] | [[gzip|bzip2|xz|zstd|zstdchunked]] > [path/to/file.tar[.gz|.bz2|.xz|.zst|.zst]]
copy

Transfer an image to remote system with on-the-fly compression and progress bar
$ podman save [image:tag] | zstd [[-T|--threads]] 0 --ultra | pv | ssh [username]@[remote_host] podman load
copy

SYNOPSIS

podman save [options] IMAGE [IMAGE...]

PARAMETERS

-o, --output string
    Write archive to specified file instead of STDOUT

--compress
    Compress output to .tar.gz (cannot use with .tar output file)

-f, --format string
    Manifest type: oci (default), v2s2, or io.v1.distribution

-q, --quiet
    Suppress progress output

DESCRIPTION

The podman save command exports one or more container images to a tar archive file, preserving the image layers, configuration, and manifest. By default, it writes the archive to STDOUT, allowing redirection to a file, but the -o option specifies an output file directly.

This is useful for transferring images between systems without a container registry, backing up images, or importing into other tools like Docker via docker load. Multiple images can be saved into a single archive, where common layers are deduplicated to save space.

Supports compression to .tar.gz format and manifest formats like OCI or v2s2 for compatibility. The resulting archive is self-contained and portable across Podman installations.

CAVEATS

Requires at least one IMAGE argument; outputs to STDOUT by default (use redirection or -o); compression incompatible with explicit .tar files.

EXAMPLES

podman save -o myimage.tar myimage:tag
podman save --compress -o images.tar.gz image1 image2
podman save alpine | ssh user@host 'podman load'

HISTORY

Introduced with Podman 1.0 (2019) by Red Hat as part of libpod project; emulates Docker's docker save for rootless container management.

SEE ALSO

podman-load(1), podman-images(1), skopeo-copy(1)

Copied to clipboard