How to Import .bson file format

2,199 views
Skip to first unread message

Saladin

unread,
Jul 20, 2011, 9:43:42 PM7/20/11
to mongodb-user
Hi all, I was export whole my db on server using "mongodump" and the
output is "*.bson" files, than now I wanna running that db on my local
computer, I have tried to run use command line "mongorestore" and
"mongoimport" but not working, so my question is what is the correct
syntax to import *.bson files? and what there is any tool client for
export/ import *.bson files ? .thanks

Sridhar

unread,
Jul 21, 2011, 12:58:26 AM7/21/11
to mongodb-user
What error are you seeing?
I dumped my entire database using mongodump --host localhost. This
creates a folder dump in the present directory. I can use this
directory to restore the entire db using mongorestore --host localhost
dump. Note I need mongodb running during the restore. In my case since
I tested on the same machine I stop mongodb after the dump and restart
with a new dbpath.
More information on dump / restore options can be found at
http://www.mongodb.org/display/DOCS/Import+Export+Tools?focusedCommentId=5799964#ImportExportTools-mongodumpandmongorestore

Bin Asep

unread,
Jul 21, 2011, 1:35:43 AM7/21/11
to mongodb-user
@Sridar thanks for y'r reply, running now.

Regards,


On Jul 21, 11:58 am, Sridhar <sridh...@gmail.com> wrote:
> What error are you seeing?
> I dumped my entire database using mongodump --host localhost. This
> creates a folder dump in the present directory. I can use this
> directory to restore the entire db using mongorestore --host localhost
> dump. Note I need mongodb running during the restore. In my case since
> I tested on the same machine I stop mongodb after the dump and restart
> with a new dbpath.
> More information on dump / restore options can be found athttp://www.mongodb.org/display/DOCS/Import+Export+Tools?focusedCommen...
Reply all
Reply to author
Forward
0 new messages