Skip to content
August 1, 2012 / edeustace

Mongo gem for make backing up with mongo easier

On my current project we are using mongo as our db. This means alot of backing up, copying and restoring dbs. mongo has great tools for this namely mongodump and mongorestore, but I was getting tired of having to add my configurations for different dbs into different shell scripts.

Also I didn’t really have a back up system in place.

To make my life easier – I’ve put together a little gem called *mongo-db-utils*. Its a wrapper on top of mongodump and mongorestore.

The nice thing about it is that you can save your configuration, so the next time you launch it it’ll remember the db’s or amazon buckets you work with.

Also it backs up the dbs using its own convention so you’ll always know where the latest db is. The config file and the backups are stored in ~/.mongo-db-utils.

Its on github, it may be a little rough around the edges (let me know if you’ve any issues), but I’ve been using it daily here for the last week and its working good. Unfortunately it’ll only run on Linux/OSX at the moment.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: