DeamonMV
DeamonMV

Reputation: 732

update mongo 2.4 to 2.6

I want to upgrade my mongodb to 3.2, but when I try to upgrade to 2.6 I already get error

What I do:

In there are no problem(I think), I get message from mongo:

Everything is ready for the upgrade!
true

but I got error:

res = db.getSiblingDB("admin").runCommand({authSchemaUpgrade: 1 });
 {
       "ok" : 0,
       "errmsg" : "no such cmd: authSchemaUpgrade",
       "bad cmd" : {
        "authSchemaUpgrade" : 1
    }
}
 print(tojson(res));
{
    "ok" : 0,
    "errmsg" : "no such cmd: authSchemaUpgrade",
    "bad cmd" : {
        "authSchemaUpgrade" : 1
    }
}

And no different what database I use. What I do wrong?

Upvotes: 2

Views: 930

Answers (1)

DeamonMV
DeamonMV

Reputation: 732

To resolve this problem you need to do one thing: after you do this:

  • I run mongo from /tmp/mongodb-linux-x86_64-2.6.11/bin/mongo In console mongodb run use admin db.upgradeCheckAllDBs()

You should to stop mongod previous version and then run mongod of version 2.6. After this you can do authSchemaUpgrade

Upvotes: 3

Related Questions