Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-2011

mongodump, bsondump and mongoexport should only write to stderr in case of a serious error

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.5.0
    • Affects Version/s: None
    • Component/s: Tools
    • Labels:

      I'm the "author" of the AutoMongoDump tool on github (github.com/
      micahwedemeyer/automongobackup). I basically took the very nice
      AutoMySQLDump bash script and modified it for use with MongoDB.
      Thanks, by the way, for making the mongodump CLI so similar to
      mysqldump. I assume that wasn't an accident.

      Anyways, it seems that every time mongodump runs, it writes some debug
      output (like "connected to:") to stderr. The
      automysqldump script is set up to count anything written to stderr as
      a serious error and alert the user that the dump has probably failed.
      I've hacked around this for my mongo port, assuming that everything in
      stderr is just warning messages, not fatal errors. I tried playing
      with analyzing the output to stderr a little, but it seemed like a bad
      road to head down.

      I'd like to request that if anyone chooses to refactor or work on
      mongodump, please modify it only write to stderr if a serious error
      occurs. That way I can update the script to alert the user in case of
      serious errors.

            sverch Shaun Verch
            micahwedemeyer Micah Wedemeyer
            8 Vote for this issue
            12 Start watching this issue