How to backup my MongoDB to Amazon S3?


I searched a lot for an easy script that would give me an option to easily make a daily backup of my MongoDB database and then upload the backup to Amazon S3.

I found a few solutions, but they did not did exactly what I wanted.

I found one that did exactly what I wanted, but it was for MySQL, not for MongoDB… So… I converted that script to do the same with MongoDB and now it is available for you to use on Github.

You can make daily, weekly and monthly backups. it can be automated through CRON. The only dependency is ‘s3cmd‘ which is a really recommended for everyone who uses Amazon S3.

The code is really simple, and I’ll put it here, but if you want the latest version – download it from the project Github repository.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">