得到以下错误:
db.copyDatabase("old_db","new_db","localhost:27017");
WARNING: db.copyDatabase is deprecated. See http://dochub.mongodb.org/core/copydb-clone-deprecation
{
"note" : "Support for the copydb command has been deprecated. See http://dochub.mongodb.org/core/copydb-clone-deprecation",
"ok" : 1
}
https://docs.mongodb.com/manual/release-notes/4.0-compatibility/#copydb-and-clone-commands
我转到了此链接,但是对此没有解决方案。
任何线索都将不胜感激。
答案 0 :(得分:0)
使用mongodump和mongorestore或使用驱动程序编写脚本。