[SERVER-3802] Mongodump prints boost create_directory error Created: 10/Sep/11  Updated: 11/Jul/16  Resolved: 17/Jan/12

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: 2.0.0-rc2
Fix Version/s: 2.1.0

Type: Bug Priority: Minor - P4
Reporter: Nicola Bizzoca Assignee: Brandon Diamond
Resolution: Done Votes: 4
Labels: mongodump
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows Server 2008 R2 Service Pack 1


Issue Links:
Related
related to SERVER-4235 Mongodump error: "error: boost::files... Closed
Operating System: ALL
Participants:

 Description   

Mongodump started without arguments fails with:

DATABASE: * to dump/*
error: boost::filesystem::create_directory
ume label syntax is incorrect: "dump*"



 Comments   
Comment by Brandon Diamond [ 17/Jan/12 ]

Fixed in related ticket.

Comment by Joey Mink [ 28/Dec/11 ]

Just ran into the same with mongodb 2.0.1 (win32_x64):

C:\mongodb-win32-x86_64-2.0.1\bin>mongodump
connected to: 127.0.0.1
all dbs
DATABASE: address        to     dump/address
        address.AddressLookupTableRecord to dump/address/AddressLookupTableRecord.bson
                175900/4760547  3%
...
DATABASE: *      to     dump/*
error: boost::filesystem::create_directory: The filename, directory name, or volume label syntax is incorrect: "dump\*"

The 'dump' directory did not exist at the time I invoked mongodump. This was run on NTFS.

Comment by Aristarkh Zagorodnikov [ 24/Oct/11 ]

The problem is that mongodump (for no obvious reasons) creates the database named "*" when dumping. While it works fine when it dumps from Linux, on Windows one can't have "*" as a part of a file or directory name, thus leading to this error.
So, this is in fact not one problem but two:
1. I guess you should look why the "*" database is created in the first place and stop doing this while dumping (I took a quick look at the tools/dump.cpp, there is some kind of "*.*" collection access when you dump all databases, worth looking into).
2. Unsupported file/directory names should be auto-fixing at least for maintenance tools. Please check SERVER-3894.

Comment by Nicola Bizzoca [ 10/Sep/11 ]

It was run inside an empty directory

NTFS

Comment by Scott Hernandez (Inactive) [ 10/Sep/11 ]

Did you run this from an empty directory, or was there already a "dump" sub-directory?

What filesystem was this run on?

Comment by Nicola Bizzoca [ 10/Sep/11 ]

"mongodump.exe"

Despite that, it finish the job correctly

Comment by Scott Hernandez (Inactive) [ 10/Sep/11 ]

What is the exact command which you entered?

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