Skip to main content

MongoDB backups to cloud Amazon S3

Project description

Install

$ sudo pip install s3mongobkp

Configuration

All configuration located in /etc/s3mongobkp.conf:

# /etc/s3mongobkp.conf

[amazon]
access_key  = AKIAIK4KP&XSYHCIF*OK
secret_key  = +SqasKIMLizimFBmHJKPlJsSKldWnd1wNmSIkLvs
# Allocate a separate backup bucket, the program can remove other data from the bucket.
# Use unique name bucket.
bucket_name = mongobackup

[mongo]
hostname = localhost:27017
database = mybase
# Don't use this options if no password is set.
username =
password =

[backup]
# Max life time backup in days
max_lifetime_backup = 3
# Template directory for backup
tmp_dir = /tmp

Test:

$ s3mongobkp_run.py

For periodic backup add an entry to cron:

$ crontab -e

and add an entry like:

10 */2 * * * /usr/local/bin/s3mongobkp_run.py

Warning

Allocate a separate backup bucket, the program can remove other data from the bucket.

License

S3mongobkp is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

S3mogobkp is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with S3mongobkp. If not, see <http://www.gnu.org/licenses/>.

Requirements

  • python (>=2.7.0)
  • boto (>=2.7.0)
  • mongodb (>=2.2)

Project details


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
s3mongobkp-0.2.tar.gz (2.4 kB) Copy SHA256 hash SHA256 Source None Apr 8, 2014

Supported by

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