blob: 39edbb15855bd81933e2822f4b24998a41b64c8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
<h1>docker export</h1> <p><br></p> <p>Export a container’s filesystem as a tar archive</p> <h2 id="usage">Usage</h2> <div class="highlight"><pre class="highlight" data-language="">$ docker export [OPTIONS] CONTAINER
</pre></div> <p>Refer to the <a href="#options">options section</a> for an overview of available <a href="#options"><code class="language-plaintext highlighter-rouge">OPTIONS</code></a> for this command.</p> <h2 id="description">Description</h2> <p name="extended-description">The <code class="language-plaintext highlighter-rouge">docker export</code> command does not export the contents of volumes associated with the container. If a volume is mounted on top of an existing directory in the container, <code class="language-plaintext highlighter-rouge">docker export</code> will export the contents of the <em>underlying</em> directory, not the contents of the volume.</p> <p>Refer to <a href="https://docs.docker.com/storage/volumes/#backup-restore-or-migrate-data-volumes">Backup, restore, or migrate data volumes</a> in the user guide for examples on exporting data in a volume.</p> <p>For example uses of this command, refer to the <a href="#examples">examples section</a> below.</p> <h2 id="options">Options</h2> <table> <thead> <tr> <td>Name, shorthand</td> <td>Default</td> <td>Description</td> </tr> </thead> <tbody> <tr> <td>
<code class="language-plaintext highlighter-rouge">--output</code> , <code class="language-plaintext highlighter-rouge">-o</code>
</td> <td></td> <td>Write to a file, instead of STDOUT</td> </tr> </tbody> </table> <h2 id="examples">Examples</h2> <p>Each of these commands has the same result.</p> <div class="highlight"><pre class="highlight" data-language="">$ docker export red_panda > latest.tar
</pre></div> <div class="highlight"><pre class="highlight" data-language="">$ docker export --output="latest.tar" red_panda
</pre></div> <div class="_attribution">
<p class="_attribution-p">
© 2019 Docker, Inc.<br>Licensed under the Apache License, Version 2.0.<br>Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.<br>Docker, Inc. and other parties may also have trademark rights in other terms used herein.<br>
<a href="https://docs.docker.com/engine/reference/commandline/export/" class="_attribution-link">https://docs.docker.com/engine/reference/commandline/export/</a>
</p>
</div>
|