Reputation: 35992
Recently, I have updated from MongoDB 1.6 to MongoDB 2.0.
I have populated several collections on MongoDB 1.6. After I upgrade to MongoDB 2.0, then start mongodb with the same --dbpath parameter, I found that all previous store collections are still there.
It seems that I don't have to manually backup and reload data into the newer version.
Question> When should we backup & reload data if we decide to upgrade to new version mongodb?
Thank you
Upvotes: 0
Views: 263
Reputation: 7779
You should always backup your data before changing versions - doesn't matter up or down. I'd recommend using mongodump
which is super fast (I can tell from my experience, we were able to dump about 15M documents, 12GB database in 2 minutes). Once you've done this, upgrade the binaries and see if the existing data works. If not, restore from the dump using mongorestore
.
Upvotes: 2
Reputation:
It#s clearly documented that the database format did not change. So swapping the binaries should be good enough.
Upvotes: 0