Pham Van Son
Pham Van Son

Reputation: 65

Retrieve data from mongodb with binary type

I have a site that I created using mongodb but now I want to create a new site with MySQL. I want to retrieve data from my old site (the one using mongodb). I use RoboMongo software to connect to mongodb server but I don't see my old data (*.pdf, *.doc). I think that the data is in binary, isn't it? This is my mongodb

How can I retrieve this data?

Upvotes: 3

Views: 3269

Answers (1)

Stennie
Stennie

Reputation: 65323

The binary data you've highlighted is stored using a convention called GridFS. Robomongo 0.8.x doesn't support decoding GridFS binary data (see: issue #255).

In order to extract the files you'll either need to:

  • use the command line mongofiles utility included with MongoDB. For example:

    • mongofiles list to see files stored
    • mongofiles get filename to get a specific file
  • use a different program or driver that supports GridFS

Upvotes: 1

Related Questions