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

mongodump returns a success if collection doesn't exist

    XMLWordPrintable

Details

    • New Feature
    • Status: Accepted
    • Major - P3
    • Resolution: Unresolved
    • 100.3.0
    • None
    • mongodump
    • None
    • 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

    Description

       

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: