Uploaded image for project: 'MongoDB ETL Tools'
  1. MongoDB ETL Tools
  2. TOOLS-2198

mongodump: allow -c to be defined multiple times

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Accepted
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: mongodump
    • Labels:

      Description

      Since 3.2, mongodump has supported dumping multiple collections into a single archive file. However, it seems there is no sane way of providing multiple specific collections to dump.

      In our use-case, we want to backup two large collections separately from the rest. We can dump the rest using two `--excludeCollection` arguments, but you can't use two `--collection` arguments - only the latter one will be used.

      The only way I can figure out to dump the two collections is to first query a list of all collection names in the DB, filter out the two we want to export, and then generate a list of `--excludeCollection` arguments to exclude all but the two we want.

        Attachments

          Activity

            People

            • Assignee:
              backlog-server-tools Backlog - Server Tools Team
              Reporter:
              sampo Sampo Juustila
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: