github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/docs/source/markdown/podman-save.1.md (about)

     1  % podman-save(1)
     2  
     3  ## NAME
     4  podman\-save - Save image(s) to an archive
     5  
     6  ## SYNOPSIS
     7  **podman save** [*options*] *name*[:*tag*]
     8  
     9  **podman image save** [*options*] *name*[:*tag*]
    10  
    11  ## DESCRIPTION
    12  **podman save** saves an image to a local file or directory.
    13  **podman save** writes to STDOUT by default and can be redirected to a
    14  file using the **output** flag. The **quiet** flag suppresses the output when set.
    15  **podman save** will save parent layers of the image(s) and the image(s) can be loaded using **podman load**.
    16  To export the containers, use the **podman export**.
    17  Note: `:` is a restricted character and cannot be part of the file name.
    18  
    19  **podman [GLOBAL OPTIONS]**
    20  
    21  **podman save [GLOBAL OPTIONS]**
    22  
    23  **podman save [OPTIONS] NAME[:TAG]**
    24  
    25  ## OPTIONS
    26  
    27  #### **--compress**
    28  
    29  Compress tarball image layers when pushing to a directory using the 'dir' transport. (default is same compression type, compressed or uncompressed, as source)
    30  Note: This flag can only be set with **--format=docker-dir**.
    31  
    32  #### **--format**=*format*
    33  
    34  An image format to produce, one of:
    35  
    36  | Format             | Description                                                                  |
    37  | ------------------ | ---------------------------------------------------------------------------- |
    38  | **docker-archive** | A tar archive interoperable with **docker load(1)** (the default)            |
    39  | **oci-archive**    | A tar archive using the OCI Image Format                                     |
    40  | **oci-dir**        | A directory using the OCI Image Format                                       |
    41  | **docker-dir**     | **dir** transport (see **containers-transports(5)**) with v2s2 manifest type |
    42  
    43  #### **--help**, **-h**
    44  
    45  Print usage statement
    46  
    47  #### **--multi-image-archive**, **-m**
    48  
    49  Allow for creating archives with more than one image.  Additional names will be interpreted as images instead of tags.  Only supported for **--format=docker-archive**.
    50  The default for this option can be modified via the `multi_image_archive="true"|"false"` flag in containers.conf.
    51  
    52  #### **--output**, **-o**=*file*
    53  
    54  Write to a file, default is STDOUT
    55  
    56  #### **--quiet**, **-q**
    57  
    58  Suppress the output
    59  
    60  #### **--uncompressed**
    61  
    62  Accept uncompressed layers when using one of the OCI formats.
    63  
    64  ## EXAMPLES
    65  
    66  ```
    67  $ podman save --quiet -o alpine.tar alpine:2.6
    68  ```
    69  
    70  ```
    71  $ podman save > alpine-all.tar alpine
    72  ```
    73  
    74  ```
    75  $ podman save -o oci-alpine.tar --format oci-archive alpine
    76  ```
    77  
    78  ```
    79  $ podman save --compress --format oci-dir -o alp-dir alpine
    80  Getting image source signatures
    81  Copying blob sha256:2fdfe1cd78c20d05774f0919be19bc1a3e4729bce219968e4188e7e0f1af679d
    82   1.97 MB / 1.97 MB [========================================================] 0s
    83  Copying config sha256:501d1a8f0487e93128df34ea349795bc324d5e0c0d5112e08386a9dfaff620be
    84   584 B / 584 B [============================================================] 0s
    85  Writing manifest to image destination
    86  Storing signatures
    87  ```
    88  
    89  ```
    90  $ podman save --format docker-dir -o ubuntu-dir ubuntu
    91  Getting image source signatures
    92  Copying blob sha256:660c48dd555dcbfdfe19c80a30f557ac57a15f595250e67bfad1e5663c1725bb
    93   45.55 MB / 45.55 MB [======================================================] 8s
    94  Copying blob sha256:4c7380416e7816a5ab1f840482c9c3ca8de58c6f3ee7f95e55ad299abbfe599f
    95   846 B / 846 B [============================================================] 0s
    96  Copying blob sha256:421e436b5f80d876128b74139531693be9b4e59e4f1081c9a3c379c95094e375
    97   620 B / 620 B [============================================================] 0s
    98  Copying blob sha256:e4ce6c3651b3a090bb43688f512f687ea6e3e533132bcbc4a83fb97e7046cea3
    99   849 B / 849 B [============================================================] 0s
   100  Copying blob sha256:be588e74bd348ce48bb7161350f4b9d783c331f37a853a80b0b4abc0a33c569e
   101   169 B / 169 B [============================================================] 0s
   102  Copying config sha256:20c44cd7596ff4807aef84273c99588d22749e2a7e15a7545ac96347baa65eda
   103   3.53 KB / 3.53 KB [========================================================] 0s
   104  Writing manifest to image destination
   105  Storing signatures
   106  ```
   107  
   108  ## SEE ALSO
   109  **[podman(1)](podman.1.md)**, **[podman-load(1)](podman-load.1.md)**, **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)**, **[containers-transports(5)](https://github.com/containers/image/blob/main/docs/containers-transports.5.md)**
   110  
   111  ## HISTORY
   112  July 2017, Originally compiled by Urvashi Mohnani <umohnani@redhat.com>