mongodump/mongorestore and oplog.bson

Gustavo Niemeyer gustavo at niemeyer.net
Thu Oct 30 15:38:01 UTC 2014


The source code of mongodump lives at:

https://github.com/mongodb/mongo-tools/tree/master/mongodump

It is now written in Go, using mgo. Should be easy to find out any details
you need there.

On Thu Oct 30 2014 at 12:45:52 PM Eric Snow <eric.snow at canonical.com> wrote:

> When running mongodump with the --oplog, you end up getting an
> oplog.bson file dumped, along with a directory for each dumped
> database.  mongorestore likewise has an --oplog option, which
> presumably causes it to use that oplog.bson file.
>
> Who could tell me about that oplog.bson file?  In my testing for
> backups, it always comes up empty.  If I can always expect it to be
> empty then I'll be a happy camper.  Otherwise, what are the cases
> where it would not be empty and is there a safe way I could parse/edit
> oplog.bson in those cases?  My guess is that it will be non-empty when
> mongdump is run while mongo has actions queued up or when requests
> come in while mongodump is running.  Regardless, any insight here
> would be helpful.  Thanks!
>
> -eric
>
> --
> Juju-dev mailing list
> Juju-dev at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/juju-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20141030/b232224a/attachment-0001.html>


More information about the Juju-dev mailing list