[SERVER-4235] Mongodump error: "error: boost::filesystem::create_directory: The filename, directory name, or volume label syntax is incorrect" while exporting collection "*" Created: 09/Nov/11  Updated: 11/Jul/16  Resolved: 18/Nov/11

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: 2.0.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Rod Furlan Assignee: Brandon Diamond
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows


Issue Links:
Related
is related to SERVER-3802 Mongodump prints boost create_directo... Closed
Operating System: ALL
Participants:

 Description   

When I try to mongodump all databases, I get the following error:
error: boost::filesystem::create_directory: The filename, directory name, or volume label syntax is incorrect: "c:\Backup*"

Unfortunately, this error also terminates the dump process. When I list the databases in my server, there is indeed a database named "*" but I am not able to interact with it in any meaningful way.

What do you recommend I try next?



 Comments   
Comment by Brandon Diamond [ 18/Nov/11 ]

No problem! I'll update the ticket

Comment by Rod Furlan [ 18/Nov/11 ]

Thank you Brandon, that worked!

(re: list databases)I was using "show dbs" and I didn't notice it until we started having problems while dumping.

Comment by Brandon Diamond [ 18/Nov/11 ]

You can delete the database by starting the mongo shell, ensuring that you're using a database that isn't <asterisk>, then running:

> db.getSiblingDB("*").dropDatabase()

Note that you will lose all of the data in that database.

Can you give me more information about what you mean by "list databases"? Also, when did you start noticing this asterisk? Did it exist before the problematic mongodump?

Comment by Rod Furlan [ 18/Nov/11 ]

There isn't a file or directory named "" on our server's database path but a database named "" shows up when I list the databases. Server is running 2.0.1 on Ubuntu Server 11.04. I cannot remove this database because it is not present in the file system and I am unable to interact with it using the mongo console. Any ideas?

Comment by Rod Furlan [ 18/Nov/11 ]

There isn't a file or directory named "" on our server's database path but a database named "" shows up when I list the databases. Server is running 2.0.1 on Ubuntu Server 11.04. I cannot remove this database because it is not present in the file system and I am unable to interact with it using the mongo console. Any ideas?

Comment by Brandon Diamond [ 18/Nov/11 ]

Generally speaking, every collection and database corresponds to files in your data directory. We support any names that are supported by your filesystem. Windows, as it happens, cannot deal with an asterisk in a filename. Thus, it should not be possible for a collection or database to have <asterisk> in its name.

If the <asterisk> name existed before running dump, your next step depends on what the name is – collection or database. You can either rename or remove to fix.

If the asterisk appeared after running mongodump, please provide the command line you used. I'll re-open the ticket and take a look because that would likely indicate a bug.

Thanks!

Comment by Brandon Diamond [ 18/Nov/11 ]

Hi Rod – I'm working on repairing the issue you're describing and have a few questions:

  • Is "*" a database or a collection (the ticket title says 'while exporting collection "*"')?
  • Did it exist before you ran mongodump? Or was it created by the dump?
  • Did you attempt to run the command with "c:\Backup*" as an argument?

Thanks! Hopefully we can solve this right away.

Generated at Thu Feb 08 03:05:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.