0

I am upgrading my Mongo Database beacause the current version is not even suposed to be in production mode. You will understand right away:

The project I am working on use mongoDB server 2.7.3. This is a very early development/unstable release. So after updating the source code on an other website I am ready to swap from this old server to the new one.

What's missing is migration of data and here is my question :

This old mongoDB release don't allow to mongoDump. How can I safely transfer an important amout of data (around 50 go) to the new server ?

I am using Studio 3T (new robot 3t).

I have tried to export every collection as a JSON file but this doesn't save the index and types. Total is 5 GO whereas I have around 50 GO in DB I cannot export as Bson because I need mongodump to do so, well from what I found.

Any workaround ?


Gabson
  • 421
  • 1
  • 4
  • 20
  • Why is it that the mongodump utility cannot be used? I thought that one has been around since 2.x versions predating your 2.7.3 version. – Michaël van der Haven Feb 13 '18 at 16:03
  • I don't know why but 2.7.3 is an early release of what will become mongoDB 3.0. From what I ubnderstood it's know we cannot dump this version.. sadly – Gabson Feb 14 '18 at 08:50
  • MongoDB 2.7.3 server is indeed an early unstable/development release. However, I expect you should still be able to use `mongodump` or upgrade in place to MongoDB 3.0 (but stop `mongod` and take a file copy backup before doing so!). What version of `mongodump` and command-line options did you try to use and what was the error message when you tried to do so? What version of MongoDB are you trying to upgrade to? – Stennie Feb 14 '18 at 09:11
  • I just downloaded the old 2.7.3 version. `mongodump` is part of that distribution. I would simply give it a shot and use it on your database. If it doesn't work, then please post some info on error messages during the creation of the dump or the restore in your newer database version. – Michaël van der Haven Feb 14 '18 at 21:09
  • Here is the error when I try a mongoDump command : 2018-02-16T14:32:18.989+0100 [############............] app18820246.productdatamodels 18911/35023 (54.0%) 2018-02-16T14:32:18.989+0100 Failed: error reading collection: BSONObj size: 1830826035 (0x6D203033) is invalid. Size must be between 0 and 16793600(16MB) First element: : ?type=76 real 0m10.608s user 0m31.484s sys 0m2.660s – Gabson Feb 16 '18 at 13:46

0 Answers0