per-database mongodump

Eric Snow eric.snow at canonical.com
Mon Oct 27 23:07:54 UTC 2014


For backup we currently call mongodump with the --oplog option.  This
dumps all databases at the same moment in time, which gives us
assurances about the consistency of each database.  However, we want
to exclude some databases.  Unfortunately --oplog is not compatible
with the --db option.

I'm looking for options here.  I'm already considering, but am not
satisfied with, the following:

1. (mongodump --db ...) Forgo the moment-in-time guarantee of --oplog
(seems risky).
2. (mongodump --oplog ...) Manually remove the undesired databases
from the dumped data (possible? risky!).
3. (mongodump --oplog ...) Skip the undesired databases when calling
mongorestore (possible?).
4. (mongodump --oplog ...) Clear the undesired databases after calling
mongorestore.

The problem with 3 and 4 is that the backup archive will contain a
bunch of erroneous data (the dumps of the databases we want to
ignore).

-eric



More information about the Juju-dev mailing list