gpt4 book ai didi

mongodb - 从本地主机到 cosmosDb 的 Mongorestore 失败, "disable retryable writes by specifying "retrywrites=false”

转载 作者:行者123 更新时间:2023-12-03 19:41:18 25 4
gpt4 key购买 nike

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/
有同样的错误。

最佳答案

我发现this command --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}
enter image description here

关于mongodb - 从本地主机到 cosmosDb 的 Mongorestore 失败, "disable retryable writes by specifying "retrywrites=false”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64188655/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com