Uploaded image for project: 'MongoDB CLI Tools'
  1. MongoDB CLI Tools
  2. TOOLS-14

Mongodump handling characters in collections and database names, that are not supported by the platform

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Gone away
    • Affects Version/s: Legacy C++ Implementation
    • Fix Version/s: None
    • Component/s: mongodump
    • Labels:
    • Environment:
      Windows
    • Case:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gabriel.russell Gabriel Russell
                Reporter:
                ian.whalen Ian Whalen
              • Votes:
                13 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: