[SERVER-2459] Omit some collections with mongodump Created: 01/Feb/11 Updated: 12/Jul/16 Resolved: 13/Jun/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Tools |
| Affects Version/s: | None |
| Fix Version/s: | 2.7.2 |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | Roger Binns | Assignee: | Shaun Verch |
| Resolution: | Done | Votes: | 43 |
| Labels: | community-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Current stable on Ubuntu 10.10 64 bit |
||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | Server 2.7.2 | ||||||||||||
| Participants: | |||||||||||||
| 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. |
| Comments |
| Comment by Githook User [ 13/Jun/14 ] | |||||||
|
Author: {u'name': u'Shaun Verch', u'email': u'shaun.verch@mongodb.com'}Message: | |||||||
| Comment by Martin Konecny [ 19/May/14 ] | |||||||
|
+1 Please add this feature. | |||||||
| Comment by Matt Kangas [ 16/May/14 ] | |||||||
|
pull/163 had 18 additional "+1" comments on it, so clearly there is strong interest in this feature request. But it only supported excluding exactly one collection. A more general purpose solution would support one or more of:
A new pattern matching language is less desirable from our perspective. But options 1 and 2 seem viable and widely useful. | |||||||
| Comment by Sorin Neacsu [ 30/Apr/14 ] | |||||||
|
Come on guys, this is ridiculous, it's such an easy thing to implement, you already have a pull request, and it saves alot of time and headaches .... | |||||||
| Comment by Nic Cottrell (Personal) [ 27/Mar/14 ] | |||||||
|
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! | |||||||
| Comment by Stephen Coetzee [ 01/Oct/13 ] | |||||||
|
Is there any reason something this simple has not been done in the nearly 3 years this issue has been open? | |||||||
| Comment by Russell Smith [ 25/Apr/13 ] | |||||||
|
I'm coming across this issue when trying to use a read-only user...which could be fixed with this ticket;
| |||||||
| Comment by sanket kolhe [ 07/Mar/13 ] | |||||||
|
I have only single collection of 30% of total size . It will be great if i can dump with excluding this collections | |||||||
| Comment by Evan Adelman [ 23/Nov/12 ] | |||||||
|
i have a 80GB collection that would be ideal to be outside of normal dumps. | |||||||
| Comment by Chris Ferry [ 10/May/12 ] | |||||||
|
What's going on with this request? I have a 45GB collection that I don't want to dump. | |||||||
| Comment by Ted Behling [ 17/Jan/12 ] | |||||||
|
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 . | |||||||
| Comment by Eliot Horowitz (Inactive) [ 04/Dec/11 ] | |||||||
|
Not very soon - I would recommend whitelisting for now. | |||||||
| Comment by Graham Hargreaves [ 04/Dec/11 ] | |||||||
|
Any chance this is going to be scheduled in soon, major problem for me backing up GB of data I don't need. |