Details

    • Type: New Feature New Feature
    • Status: Open Open
    • Priority: Minor - P4 Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Component/s: Tools
    • Labels:
    • Environment:
      Current stable on Ubuntu 10.10 64 bit
    • Backport:
      No
    • # Replies:
      9
    • Last comment by Customer:
      true

      Description

      My databases are each many collections, but some do not need backing up (they are thumbnails and similar)

      I'd like an option to mongodump to specifically exclude some collections, ideally some sort of prefix or glob wildcard. Some of these collections are actually gridfs hence more convoluted names. Something like this would be great:

      mongodump --exclude-collections 'thumbnails*'

      It is also far easier to do this (blacklisting) than listing what I do want (whitelisting, current command line flags) since the collection names change all the time and it would be a pain to track.

        Issue Links

          Activity

          Hide
          Graham Hargreaves
          added a comment -

          Any chance this is going to be scheduled in soon, major problem for me backing up GB of data I don't need.

          Show
          Graham Hargreaves
          added a comment - Any chance this is going to be scheduled in soon, major problem for me backing up GB of data I don't need.
          Hide
          Eliot Horowitz
          added a comment -

          Not very soon - I would recommend whitelisting for now.

          Show
          Eliot Horowitz
          added a comment - Not very soon - I would recommend whitelisting for now.
          Hide
          Ted Behling
          added a comment - - edited

          FYI, I forked mongo on Github and wrote a patch to implement this feature. I plan to send a pull request. My fork is https://github.com/tedb/mongo . Pull request is at https://github.com/mongodb/mongo/pull/163 .

          Show
          Ted Behling
          added a comment - - edited FYI, I forked mongo on Github and wrote a patch to implement this feature. I plan to send a pull request. My fork is https://github.com/tedb/mongo . Pull request is at https://github.com/mongodb/mongo/pull/163 .
          Hide
          Chris Ferry
          added a comment -

          What's going on with this request? I have a 45GB collection that I don't want to dump.
          This seems like a logical feature to have in a database backup utility.

          Show
          Chris Ferry
          added a comment - What's going on with this request? I have a 45GB collection that I don't want to dump. This seems like a logical feature to have in a database backup utility.
          Hide
          Evan Adelman
          added a comment -

          i have a 80GB collection that would be ideal to be outside of normal dumps.

          Show
          Evan Adelman
          added a comment - i have a 80GB collection that would be ideal to be outside of normal dumps.
          Hide
          sanket kolhe
          added a comment -

          I have only single collection of 30% of total size . It will be great if i can dump with excluding this collections

          Show
          sanket kolhe
          added a comment - I have only single collection of 30% of total size . It will be great if i can dump with excluding this collections
          Hide
          Russell Smith
          added a comment -

          I'm coming across this issue when trying to use a read-only user...which could be fixed with this ticket;

          retinalols:backups russ$ mongodump --forceTableScan -h xxxxxxx --port xxxxxx -u backup -p xxxxxxx -d xxxxxx
          connected to: xxxxxxx:xxxxxxx
          Wed Apr 24 17:00:21.635 DATABASE: xxxxxxx	 to dump/xxxxxxx
          Wed Apr 24 17:00:21.801 xxxxxxx.system.indexes to dump/xxxxxxx/system.indexes.bson
          Wed Apr 24 17:00:22.048 65 objects
          Wed Apr 24 17:00:22.049 xxxxxxx.system.users to dump/xxxxxxx/system.users.bson
          assertion: 11010 count fails:{ ok: 0.0, errmsg: "unauthorized" }
          
          Show
          Russell Smith
          added a comment - I'm coming across this issue when trying to use a read-only user...which could be fixed with this ticket; retinalols:backups russ$ mongodump --forceTableScan -h xxxxxxx --port xxxxxx -u backup -p xxxxxxx -d xxxxxx connected to: xxxxxxx:xxxxxxx Wed Apr 24 17:00:21.635 DATABASE: xxxxxxx to dump/xxxxxxx Wed Apr 24 17:00:21.801 xxxxxxx.system.indexes to dump/xxxxxxx/system.indexes.bson Wed Apr 24 17:00:22.048 65 objects Wed Apr 24 17:00:22.049 xxxxxxx.system.users to dump/xxxxxxx/system.users.bson assertion: 11010 count fails:{ ok: 0.0, errmsg: "unauthorized" }
          Hide
          Stephen Coetzee
          added a comment -

          Is there any reason something this simple has not been done in the nearly 3 years this issue has been open?
          Someone even wrote a patch and a pull request, they did the work for you.

          Show
          Stephen Coetzee
          added a comment - Is there any reason something this simple has not been done in the nearly 3 years this issue has been open? Someone even wrote a patch and a pull request, they did the work for you.
          Hide
          Nic Cottrell
          added a comment -

          Yeah - i have a capped collection containing a sort of running log which never needs backing up. A flag to skip capped collection would also be useful!

          Show
          Nic Cottrell
          added a comment - Yeah - i have a capped collection containing a sort of running log which never needs backing up. A flag to skip capped collection would also be useful!

            People

            • Votes:
              36 Vote for this issue
              Watchers:
              26 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since reply:
                3 weeks, 1 day ago
                Date of 1st Reply: