github.com/pwn-term/docker@v0.0.0-20210616085119-6e977cce2565/cli/docs/reference/commandline/export.md (about)

     1  ---
     2  title: "export"
     3  description: "The export command description and usage"
     4  keywords: "export, file, system, container"
     5  ---
     6  
     7  # export
     8  
     9  ```markdown
    10  Usage:  docker export [OPTIONS] CONTAINER
    11  
    12  Export a container's filesystem as a tar archive
    13  
    14  Options:
    15        --help            Print usage
    16    -o, --output string   Write to a file, instead of STDOUT
    17  ```
    18  
    19  ## Description
    20  
    21  The `docker export` command does not export the contents of volumes associated
    22  with the container. If a volume is mounted on top of an existing directory in
    23  the container, `docker export` will export the contents of the *underlying*
    24  directory, not the contents of the volume.
    25  
    26  Refer to [Backup, restore, or migrate data volumes](https://docs.docker.com/storage/volumes/#backup-restore-or-migrate-data-volumes)
    27  in the user guide for examples on exporting data in a volume.
    28  
    29  ## Examples
    30  
    31  Each of these commands has the same result.
    32  
    33  ```bash
    34  $ docker export red_panda > latest.tar
    35  ```
    36  
    37  ```bash
    38  $ docker export --output="latest.tar" red_panda
    39  ```