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

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

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: Legacy C++ Implementation
    • Component/s: mongodump
    • Labels:
    • Environment:
      Windows
    • Platforms 2017-01-23

      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.

            Assignee:
            gabriel.russell@mongodb.com Gabriel Russell (Inactive)
            Reporter:
            ian@mongodb.com Ian Whalen (Inactive)
            Votes:
            13 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: