dump and restore from docker

docker run --rm --link :mongo [--network accountpool-net] -v :/backup mongo bash -c 'mongodump --out /backup --host mongo:27017 --username  --password  -d '


docker run --rm --link :mongo  -v :/backup mongo bash -c 'mongorestore /backup --host mongo:27017 --username  --password '

example:
local machine directory: /home/ubuntu/accountPool_bak/2019-04-19

你可能感兴趣的:(dump and restore from docker)