1、备份images
└─$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nemo v2 9c06d79c7077 3 months ago 1.62GB
tophant/arl latest 826db31cea99 4 months ago 1.19GB
tophant/arl v2.6.2 826db31cea99 4 months ago 1.19GB
ubuntu 22.04 437ec753bef3 4 months ago 77.9MB
rabbitmq 3-management-alpine f4827796695c 5 months ago 180MB
rabbitmq 3.13.1-management-alpine f4827796695c 5 months ago 180MB
mysql 5.7 5107333e08a8 8 months ago 501MB
mongo 4.0.27 e305b5d51c0a 2 years ago 430MB
┌──(kali㉿kali)-[~/ARL_BACK]
└─$ sudo docker save -o ubuntu_22.04.tar ubuntu/22.04
Error response from daemon: No such image: ubuntu/22.04
┌──(kali㉿kali)-[~/ARL_BACK]
└─$ sudo docker save -o ubuntu_22.04.tar ubuntu:22.04
┌──(kali㉿kali)-[~/ARL_BACK]
└─$ sudo docker save -o rabbitmq_3-management-alpine.tar rabbitmq:3-management-alpine
┌──(kali㉿kali)-[~/ARL_BACK]
└─$ sudo docker save -o rabbitmq_3.13.1-management-alpine.tar rabbitmq:3.13.1-management-alpine
┌──(kali㉿kali)-[~/ARL_BACK]
└─$ sudo docker save -o mysql_5.7.tar mysql:5.7
┌──(kali㉿kali)-[~/ARL_BACK]
└─$ sudo docker save -o mongo_4.0.27.tar mongo:4.0.27
2、备份docker 容器
└─$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
caacf6e8fce1 rabbitmq:3.13.1-management-alpine "docker-entrypoint.s…" 3 months ago Up 41 minutes 4369/tcp, 5671-5672/tcp, 15671-15672/tcp, 15691-15692/tcp, 25672/tcp arl_rabbitmq
979ff66176fa mongo:4.0.27 "docker-entrypoint.s…" 3 months ago Up 41 minutes 27017/tcp arl_mongodb
d4480e41f1b2 mysql:5.7 "docker-entrypoint.s…" 3 months ago Up 41 minutes 3306/tcp, 33060/tcp mysql
┌──(kali㉿kali)-[~/ARL_BACK]
└─$ sudo docker stop caacf6e8fce1
caacf6e8fce1
┌──(kali㉿kali)-[~/ARL_BACK]
└─$ sudo docker export -o arl_rabbitmq_containner.tar caacf6e8fce1
┌──(kali㉿kali)-[~/ARL_BACK]
└─$ sudo docker stop 979ff66176fa
979ff66176fa
┌──(kali㉿kali)-[~/ARL_BACK]
└─$ sudo docker export -o arl_mongodb_containner.tar 979ff66176fa
┌──(kali㉿kali)-[~/ARL_BACK]
└─$ sudo docker stop d4480e41f1b2
d4480e41f1b2
┌──(kali㉿kali)-[~/ARL_BACK]
└─$ sudo docker export -o arl_mysql_containner.tar d4480e41f1b2
标签:ago,kali,备份,sudo,BACK,docker,ARL From: https://www.cnblogs.com/betobe/p/18365142