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

mongodump returns a success if collection doesn't exist

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 100.3.0
    • Component/s: mongodump
    • None
    • Environment:
      Ubuntu 20.04.2 LTS
      Linux 5.4.0-74-generic #83-Ubuntu SMP Sat May 8 02:35:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

       

      Steps to Reproduce

       

      ~# mongodump -o ./ --host db-1/db1-1,db1-2,db1-3 -u someuser --authenticationDatabase admin -d dbname -j 1 --readPreference=secondaryPreferred --gzip -c collectionname
      Enter password:
      2021-07-07T12:46:10.416+0300 namespace with DB dbname and collection collectionname does not exist
      ~# echo $?
      0
      

       

      Expected Results

      Mongodump should return non-zero error code.

            Assignee:
            Unassigned Unassigned
            Reporter:
            vergil@drive.net Alexander Ivanes
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: