On certain platforms (Windows), there are characters that are not a legal part of a file name (for example <, >, ?, *, |, etc.). When one uses mongodump and database name or collection name contains one of these characters (server is on Linux and mongodump is run on Windows for example), mongodump fails, because it cannot create the associated directory or file. I propose that mongodump should either warn user about this (instead of crashing with boost exception) or replace the offending characters with something like "$" or any other character (replacing characters can lead to collisions, but at least it's better than simply dying).
Take note that I don't see this as a real "problem", but I got hit by this myself when moving our maintenance scripts from a Linux box to Windows one, so I think others might benefit from this improvement too.
- is duplicated by
-
SERVER-13313 mongodump: Reserved characters in NTFS cause problems
- Closed
- related to
-
TOOLS-1163 mongodump/restore mongoexport/import and slashes in collection names
- Closed
-
SERVER-5002 Change prohibited character sets in database names
- Closed