Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
facilitates static backups for MongoDB, a work-in-progress
Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
monger
.gitignore
backup.py
monger_config.py.sample
readme.md
requirements.txt

readme.md

  1. run mongodump
  2. tar the result
  3. send to S3

This is meant to be used with cron. You probably want some combination of hourly/daily/ backups. Your crontab might look like

0 1 * * * /path/to/mongo_backup.py --config /path/to/config.py --bucket pipeline-hourly
0 0 1 * * /path/to/mongo_backup.py --config /path/to/config.py --bucket ivrhub-daily

This system will currently not purge any backups.

configuration

See the example config file - make a copy with real values somewhere safe. You'll need AWS credentials for accessing S3.

requirements

Use virtualenv and pip:

$ virtualenv /path/to/venv
$ /path/to/venv/bin/activate
(venv)$ pip install -r requirements.txt

testing

The Monger class is tested using nose:

(venv)$ cd monger
(venv)$ nosetests

Change into the package dir to make sure the fixtures are picked up..

script

See backup.py for a script that interfaces with the Monger package.

restoration

All manual for now:

  1. pull down the relevant backup from S3
  2. un-tar it
  3. run mongorestore
Something went wrong with that request. Please try again.