Ned*_*udi 4 mongodb azure-cosmosdb azure-cosmosdb-mongoapi
mongo 客户端 v 4.4
mongorestore --host <host> --port 10255 -u <user> -p <password> --db <db_name> --collection structures structures.bson --ssl --sslAllowInvalidCertificates
2020-10-03T23:13:44.440+0300    Failed: <db_name>.structures: error restoring from structures.bson: (BadValue) Retryable writes are not supported. Please disable retryable writes by specifying "retrywrites=false" in the connection string or an equivalent driver specific config.
我试过另一种方式
mongorestore "mongodb://<host>:<password>@<name>:10255/?ssl=true&retrywrites=false&appName=@name@" dump/
有同样的错误。
Tin*_*ang 12
我发现这个命令 --writeConcern="{w:0}"可以解决“rewrite=false”错误。我已经试过了,这是我的命令。
mongorestore.exe --uri "<cosmosdb_connect_string>" --db Database1 --collection collection1 --ssl --sslAllowInvalidCertificates edx-dump/Database1/collection1.bson --writeConcern {w:0}
| 归档时间: | 
 | 
| 查看次数: | 1055 次 | 
| 最近记录: |