Remote MongoDB Dump Failure

394 views
Skip to first unread message

onmyway365

unread,
Nov 14, 2015, 2:44:01 AM11/14/15
to mongodb-user

I hope you can help me. I am trying to make a data dump on a MongoDB remotely, but am getting an error.

I use the following command from my Windows CMD console to create the backup:

C:\Program Files\MongoDB\Server\3.0\bin\imports>mongodump --host 10.13.9.210 --port 29039 --out E:\Mongo\Data\Backup\Dump

It all seems to run and dump and write,

2015-11-13T15:56:30.159+0200    writing IOWA.VENDORITEM to E:\Mongo\Data\Backup\Dump\IOWA\VENDORITEM.bson
2015-11-13T15:56:30.162+0200    writing IOWA.CALLCLOSURECODE metadata to E:\Mongo\Data\Backup\Dump\IOWA\CALLCLOSURECODE.metadata.json
2015-11-13T15:56:30.171+0200    writing IOWA.PRICELISTITEM metadata to E:\Mongo\Data\Backup\Dump\IOWA\PRICELISTITEM.metadata.json
2015-11-13T15:56:30.193+0200    done dumping IOWA.CALLCLOSURECODE (0 documents)
2015-11-13T15:56:30.194+0200    writing IOWA.BULLETINBOARD to E:\Mongo\Data\Backup\Dump\IOWA\BULLETINBOARD.bson
2015-11-13T15:56:30.205+0200    done dumping IOWA.PRICELISTITEM (0 documents)
2015-11-13T15:56:30.205+0200    writing IOWA.BINLOCATION to E:\Mongo\Data\Backup\Dump\IOWA\BINLOCATION.bson

But then I get this ERROR:

2015-11-13T15:56:30.270+0200    Failed: error creating bson file `E:\Mongo\Data\Backup\Dump\IOWA1\db.getCollection('MASTER').distinct("_t").bson`: open E:\Mongo\Data\Backup\Dump\IOWA1\db.getCollection('MASTER').distinct("_t").bson: The filename, directory name, or volume label syntax is incorrect.

Any help would greatly be appreciated!

Rhys Campbell

unread,
Nov 16, 2015, 4:20:34 AM11/16/15
to mongodb-user
It looks like you have accidentally created created a collection with a funny name and windows won't let you create a file with it. 

In mongo go to you IOWA1 database and run "show collections"

If this collection is not needed you can simply drop it. Otherwise you will need to rename it.

onmyway365

unread,
Nov 16, 2015, 4:57:35 AM11/16/15
to mongodb-user
@Rhys Thanks for the ressponce. However, I have checked the collections, and there is no "funny" names. I am able to do a dump locally on the server. The issue is doing the dump remotely. 

Rhys Campbell

unread,
Nov 16, 2015, 5:22:11 AM11/16/15
to mongodb-user
Mmm ok. Are the versions of the mongo tools and the remote server the same?

onmyway365

unread,
Nov 16, 2015, 8:15:38 AM11/16/15
to mongodb-user
@Rhys Locally I am using 3.0.6, and on the server is 3.0.5. I can however query the server DBs from my shell (3.0.6) without any issues. 


On Saturday, November 14, 2015 at 9:44:01 AM UTC+2, onmyway365 wrote:

Rhys Campbell

unread,
Nov 16, 2015, 8:27:30 AM11/16/15
to mongodb-user
Mmmm, odd then. Can you show your collection name?

Perhaps you could try to exclude this by name? 

onmyway365

unread,
Nov 17, 2015, 1:37:25 AM11/17/15
to mongodb-user
@Rhys I will dig a bit deeper, and revert once I get a solution or more info. Thanks for the help!;)


On Saturday, November 14, 2015 at 9:44:01 AM UTC+2, onmyway365 wrote:
Reply all
Reply to author
Forward
0 new messages