3

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?

2
  • 1
    I assume you used GridFS to store the files? Commented Mar 21, 2015 at 18:13
  • i'm not sure. I hire a guy to code this site. Which code you need to help me Markus W Mahlberg Commented Mar 22, 2015 at 3:58

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

thanks for your answer.... can you give me code in linux to decoding GridFS binary data?
@PhamVanSon You should be able to use the mongofiles utility to extract the files. It's included as part of the full MongoDB install, or in a separate package that just should be called mongodb-org-tools for recent versions of MongoDB.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.