github.com/brahmaroutu/docker@v1.2.1-0.20160809185609-eb28dde01f16/docs/reference/commandline/save.md (about)

     1  <!--[metadata]>
     2  +++
     3  title = "save"
     4  description = "The save command description and usage"
     5  keywords = ["tarred, repository, backup"]
     6  [menu.main]
     7  parent = "smn_cli"
     8  +++
     9  <![end-metadata]-->
    10  
    11  # save
    12  
    13  ```markdown
    14  Usage:  docker save [OPTIONS] IMAGE [IMAGE...]
    15  
    16  Save one or more images to a tar archive (streamed to STDOUT by default)
    17  
    18  Options:
    19        --help            Print usage
    20    -o, --output string   Write to a file, instead of STDOUT
    21  ```
    22  
    23  Produces a tarred repository to the standard output stream.
    24  Contains all parent layers, and all tags + versions, or specified `repo:tag`, for
    25  each argument provided.
    26  
    27  It is used to create a backup that can then be used with `docker load`
    28  
    29      $ docker save busybox > busybox.tar
    30      $ ls -sh busybox.tar
    31      2.7M busybox.tar
    32      $ docker save --output busybox.tar busybox
    33      $ ls -sh busybox.tar
    34      2.7M busybox.tar
    35      $ docker save -o fedora-all.tar fedora
    36      $ docker save -o fedora-latest.tar fedora:latest
    37  
    38  It is even useful to cherry-pick particular tags of an image repository
    39  
    40      $ docker save -o ubuntu.tar ubuntu:lucid ubuntu:saucy