Hel*_*röm 8 backup mongodb mongorestore
我正在尝试使用mongorestoregzip文件恢复数据库.数据库大小约为89MB,gzip文件大约为4.4MB.
但是,还原将无限期挂起,并显示错误消息.我应该如何解决这个问题?
我运行的命令是:
mongorestore --gzip --archive ./my-db.gz --drop -u admin --authenticationDatabase admin --verbose=5
因此响应如下:
2018-01-09T15:47:45.089+0100    standard input is a terminal; reading password from terminal
Enter password:
2018-01-09T15:47:46.508+0100    will listen for SIGTERM, SIGINT, and SIGKILL
2018-01-09T15:47:46.509+0100    checking options
2018-01-09T15:47:46.509+0100        dumping with object check disabled
2018-01-09T15:47:46.527+0100    connected to node type: standalone
2018-01-09T15:47:46.528+0100    standalone server: setting write concern w to 1
2018-01-09T15:47:46.528+0100    using write concern: w='1', j=false, fsync=false, wtimeout=0
在这里,它永远停止.数据库已成功创建,但仍保持0b大小.
奇怪的是,MongoDB Compass中的数据库概述显示了数据库中具有~28k文档的单个集合,这正是我所期望的,平均大小和其他元数据显然是正确的,但没有任何东西可以读取.
我已从实时集群中导出数据库,并尝试导入到我的本地开发环境,通过Docker运行单个实例.
我应该从哪里出发?
谢谢.
Hel*_*röm 22
我找到了解决方案.
如果我运行命令--archive ./my-db.gz,我会遇到死锁.如果我这样做--archive=./my-db.gz,它会正确恢复(即需要等号).
我正在运行MacOSX High Sierra(10.13.2),并安装了brew中的MongoDB; 版:
mongorestore version: r3.4.1
git version: 4a0fbf5245669b55915adf7547ac592223681fe1
Go version: go1.7.5
   os: darwin
   arch: amd64
   compiler: gc
OpenSSL version: OpenSSL 1.0.2k  26 Jan 2017
| 归档时间: | 
 | 
| 查看次数: | 1015 次 | 
| 最近记录: |