0

I am working on AWS ec2 instance. I have configured MongoDb on it.

 1. I have 1TB storage space for mongo data to be store. 
 2. Other 50 GB for application to run.

Since cost of taking snapshot of everything is huge, Can I take snapshot of only folder where my mongodb data is stored.

  e.g my folder for mongodb storage is /home/ubuntu/mongodb

So I want snap shot or LVM of only mongodb folder instead of taking it for 1 TB instance on AWS.

sangita
  • 191
  • 5
  • 14

1 Answers1

0

you can take dumps of your database.

mongodump --dbpath /data/db/ --out /data/backup/
or
mongodump --host mongodb.example.net --port 27017

and then store it on s3. You can also run cron job for this to take backup of your data at desired time frequency.

Prem Sompura
  • 631
  • 3
  • 9
  • 16
  • mongodump do not work properly with large data. My question is strictly based on snapshot or LVM on AWS EC2 instance not anything else. – sangita Aug 10 '15 at 12:28
  • then you can run lvm for backup if cost is your concern. – Prem Sompura Aug 10 '15 at 12:48
  • If some-one else face the same issue. Please read this too http://serverfault.com/questions/366337/amazon-ec2-backup-strategy-with-restrictions-little-to-no-snapshots-can-be-take and http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html – sangita Aug 11 '15 at 05:17