...
1# export
2
3<!---MARKER_GEN_START-->
4Export a container's filesystem as a tar archive
5
6### Aliases
7
8`docker container export`, `docker export`
9
10### Options
11
12| Name | Type | Default | Description |
13|:-----------------|:---------|:--------|:-----------------------------------|
14| `-o`, `--output` | `string` | | Write to a file, instead of STDOUT |
15
16
17<!---MARKER_GEN_END-->
18
19## Description
20
21The `docker export` command doesn't export the contents of volumes associated
22with the container. If a volume is mounted on top of an existing directory in
23the container, `docker export` exports the contents of the underlying
24directory, not the contents of the volume.
25
26Refer to [Backup, restore, or migrate data volumes](https://docs.docker.com/storage/volumes/#back-up-restore-or-migrate-data-volumes)
27in the user guide for examples on exporting data in a volume.
28
29## Examples
30
31The following commands produce the same result.
32
33```console
34$ docker export red_panda > latest.tar
35```
36
37```console
38$ docker export --output="latest.tar" red_panda
39```
View as plain text