记录一下

1 先进入mongo容器

mongostore导入到docker运行的mongodb

 

 docker exec -it 9c4fa0a6205d /bin/sh

2 将要导入的数据 copy到容器的某一个文件夹,/tmp

docker cp gym-server 9c4fa0a6205d:/temp

mongostore导入到docker运行的mongodb

 

 3 mongorestore命令

mongorestore -d gym-server /tmp/gym-server

gym-server是我的数据库名称

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-07-25
  • 2022-02-06
  • 2021-12-22
  • 2021-12-13
猜你喜欢
  • 2021-10-23
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
  • 2021-05-24
相关资源
相似解决方案