Skip to main content
Help us improve Python packaging – donate today!

A oplog editing utility for mongodb.

Project Description

# oplogutils

Utilities for inspecting and manipulating the MongoDB oplog.

By Dan McKinley - - [](

## Overview

This package contains utilities for manipulating a MongoDB oplog, which can be
necessary in recovery scenarios. The tools are:

oplog-count - counts the number of events in the oplog after a certain date
and time.
oplog-trim - deletes events from the oplog after a certain date and time.

## Installation

The easiest way to install is using [setuptools](

$ easy_install oplogutils

To install from source, extract the tarball and use the following commands.

$ python build
$ sudo python install

## Examples

oplog-trim --port=27017 --remove-after="2010-05-22 03:42:00"

## Unit Tests

oplogutils comes with a fairly complete unit test suite. The suite requires the
mongod program to be somewhere in the $PATH. To run the tests, use:

python test

## See Also

* [The MongoDB website](
* See [articles tagged MongoDB on the Etsy developer blog]( for some use cases.

## Version History

### Version 0.1.2
* 05-30-2010 - Added --version switch to commands. Test fixes.

### Version 0.1.1
* 05-30-2010 - Added oplogutils to cheeseshop.

### Version 0.1
* 05-21-2010 - Initial release.

Release history Release notifications

This version
History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
oplogutils-0.1.2-py2.5.egg (11.7 kB) Copy SHA256 hash SHA256 Egg 2.5 May 30, 2010

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page