Add --includeCollectionsWithPrefix to mongodump

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: mongodump
    • 1,628

      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.

              Assignee:
              Unassigned
              Reporter:
              James Kovacs
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: