Posts

Showing posts with the label Backup

MongoDB Backup Strategies with Write-Heavy Applications

Image
The MongoDB Management Service  Backup announced earlier in May provides excellent backup and restore capabilities for your MongoDB replica set cluster. Setting up MongoDB backup is quite easy: Sign Up for service, Provide credit card details Install and configure agent In ~ 10 minutes your replica set is backed up and backup agent starts transferring the oplog data to backup mothership. Price for snapshot creating and storage is negligible, compared to the price ($2/GB) for oplog processing. For example, previous invoice was $0.89 for 330GB Snapshot storage, $0.65 for 71GB for snapshot create and $155 for 77GB of oplog traffic.  After analyzing my application, I figured out that most of the traffic was caused by two collections: metalog - 1GB capped collection which stores every API request with details opcounters - this stores various opcounters; every minute new document is created and $inc operator increases various counter(s) by one, depending on action, ...

10gen Announces MongoDB Backup Service

Image
If you are already using MongoDB Monitoring Service, or MMS, the next logical step here is to sign up for their backup service. MongoDB Backup Service MBS is a cloud-based service provided by 10gen for backing up and restoring MongoDB. Engineered for MongoDB, it features point-in-time recovery and is hosted in reliable, redundant and secure data centers. Update - I got access to MongoDB Backup Service and tried it out! Read more below. MongoDB backup, own way Before MBS was there, I spent some time setting up the backup scripts on one of my secondary servers in replica set, and it works very straight forward once set up: create backup archive and store in S3, and keep only 30 days worth of backups. run mongodump --oplog -u user -p pass mongobackups create backup-YYYYMMMDDHH.tar.bz2 file from mongobackups run /usr/bin/s3put to move file to S3 storage delete mongobackups folder Configure S3 storage lifecycle: Move to Glacier 1 day after creation date Expiration (delete)...