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

Add --includeCollectionsWithPrefix to mongodump

    XMLWordPrintable

    Details

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

      Description

      When restoring a dump via mongorestore, you can use --nsInclude=<namespace pattern> and/or --nsExclude=<namespace pattern> to filter which namespaces to restore. mongodump allows you to filter out via -excludeCollectionsWithPrefix, but not filter by inclusion.

      My particular use case is dumping out the sharding metadata caches from a shard mongod. The caches are collections that start with cache.chunks.NAMESPACE as well as cache.collections and cache.databases. I could exclude other collections within the config database, but I would much rather say include all collections that begin with "cache.".

      Even better would be if we supported the more flexible --nsInclude and --nsExclude syntax used by mongorestore so that we could specify namespace by glob patterns.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              james.kovacs James Kovacs
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: