rpe*_*ayr 1 migration mongodb mongorestore
我有一个在mongo 2.4.8上运行的mongodb生产数据库,我想升级到2.6.x.
我们想要这样做的方法是首先将数据加载到另一台运行2.6.3的服务器上mongorestore.但是,在运行该mongorestore命令时,我们收到以下错误:
Cannot restore users with schema version 1 to a system with server version 2.5.4 or greater
Run Code Online (Sandbox Code Playgroud)
我找不到与此问题相关的任何内容,也不知道该怎么做.如果重要,数据库本身不是从头开始使用mongo 2.4.x创建的,而是使用以前的版本.
我能做什么?除了使用mongorestore之外,还有其他方法吗?
预先感谢您的帮助 ...
使用2.4升级用户架构有两种方法mongodump.
这遵循正常的2.6升级路径.而不是mongorestore直接尝试2.4备份到2.6,恢复到2.4实例,然后升级到2.6.
建议在升级之前,通过2.6 shell 运行db.upgradeCheckAllDBs()mongo.这将检查由于MongoDB 2.6中的更改而导致的任何潜在兼容性问题.例如,2.6实现了更强的索引字段定义和密钥长度限制的实施.
mongorestore,然后升级用户模式这种方法需要MongoDB 2.4版本 mongorestore
启动MongoDB 2.6 mongod 而不启用auth
mongorestore 使用2.4版本的备份 mongorestore
在2.6 shell中运行authSchemaUpgrade命令mongo:
db.adminCommand({authSchemaUpgrade: 1 });
Run Code Online (Sandbox Code Playgroud)在mongod启用auth的情况下重新启动2.6
| 归档时间: |
|
| 查看次数: |
3445 次 |
| 最近记录: |