Backup Mongodb on EC2 through EBS snapshots - timing issue

Posted by DmitrySemenov on Server Fault See other posts from Server Fault or by DmitrySemenov
Published on 2014-06-01T23:04:17Z Indexed on 2014/06/02 3:30 UTC
Read the original article Hit count: 184

Filed under:
|
|
|

I'm following this guidance http://docs.mongodb.org/ecosystem/tutorial/backup-and-restore-mongodb-on-amazon-ec2/

I have 4 EBS 1000 IOPS volumes assigned to instance

These 4 volumes through MDADM assembled into software RAID10 array.

I want to do backups through EBS Snapshots as explained in the article above

Question: Mongodb says - that I need to

mongo shell>db.runCommand({fsync:1,lock:1}); -- this will lock the db for writing ....run snapshot creation... mongo shell> db.$cmd.sys.unlock.findOne(); -- this will unlock the db for writing

so do I need to unlock the DB for writing after I issued the comand ec2-create-snapshot or after it's finished and the actual snapshot is created

thanks, Dmitry

© Server Fault or respective owner

Related posts about amazon-ec2

Related posts about mongodb