If I have mongodb running in an EC2 instance that is being written to (somewhat) constantly what is the most intelligent, safe, and inexpensive backup strategy.
My concern is that if an EC2 instance goes down you lose any data written to disk...
MongoDB is an AWS Partner. To launch a fully managed MongoDB cluster on AWS, try it for free from AWS Marketplace. AWS Service Catalog administrators can add this architecture to their own catalog.
It supports a flexible data model that enables you to store data of any structure, and provides a rich set of features, including full index support, sharding, and replication. AWS enables you to set up the infrastructure to support MongoDB deployment in a flexible, scalable, and cost-effective manner on the AWS Cloud.
MongoDB provides three major strategies to backing up data: Mongodump, Copying the Underlying Files and Mongo Management Service (MMS). Selection of which strategy is dependent on factors like cost of maintenance, Shards deployment complexity, flexibility and database performance impact.
Old question but I think that I can contribute with more details and informations about a real success case.
In a production environment I have 3 Mongodb with replicaset running in 3 T2.micro instances, 1 instance is the primary, 1 instance is the secondary and 1 instance is delayed (every 4 hours is synchronized) with persistent EBS (it's not deleted after instance reboot). Every 4.5 hours I start a Lambda process that makes a EBS snapshot of delayed instance and sends to a S3 bucket. This is working pretty well.
Some links that can help:
Who better than 10gen (MongoDB developers) to responds you.
You can see in follogin site, official documentation about MongoDB backups in EC2 instances. http://docs.mongodb.org/ecosystem/platforms/amazon-ec2/
They suggest an EBS snapshots. This solution permits start instance in a few of seconds with a "photo" of your database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With