mongorestore - MongoDB Restore Failed -


i'm trying restore mongodb database dump in ubuntu 14.04.2, dump created on mongodb shell version: 2.4.13 , i'm restoring on mongodb shell version: 3.0.1.

this command i'm running , error i'm getting.

mongorestore /home/somename/backups/staging/mongo

2015-04-01t12:12:32.886+0200 building list of dbs , collections restore /home/somename/backups/staging/mongo dir

2015-04-01t12:12:32.896+0200 assuming users in dump directory <= 2.4 (auth version 1)

2015-04-01t12:12:32.896+0200 failed: users , roles collections in dump have incompatible auth version target server: cannot restore users of auth version 1 server of auth version 5

is there way around or fix?

any appreciated

you can around issue moving admin directory out of dump folder, re-run mongorestore command.

for example if ran

mongorestore --dir ~/path/to/mongodumpdir 

and failed, have admin folder in there. can move out, , re-run command above.

i believe, specially, it's system.users.bson that's causing problem. since mongo 2.x.x , 3.x.x add , store users differently.

of course, users old mongodb won't available in new db, can manually add them in.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -