Docker export Command
docker export : Exports the filesystem to STDOUT as a tar archive.
Docker export Syntax
docker export [OPTIONS] CONTAINER
OPTIONS Description:
- -o : Write the input to the file.
Docker export Example
Save the container with id a404c6c174a2 as a tar file by date.
docker export -o mysql-`date +%Y%m%d`.tar a404c6c174a2
Output:
apidemos@apidemos:~docker export -o mysql-`date +%Y%m%d`.tar a404c6c174a2
apidemos@apidemos:~ ls mysql-`date +%Y%m%d`.tar
mysql-20160711.tar