Set storage location of MongoDB installed on AWS EC2 Instance to EBS storage And How do I recover It after instance is stopped terminated

0 votes

I am new to AWS. I have created and Instance and installed MongoDB on It. But I learned from EC2 docs that the data stored on EC2 machines are destroyed once they stop or are terminated. So I have to use EBS for the data storage.

On the 4th step of creating EC2-Instance, I selected the volume enter image description here

But I don't know how to use it. Is it automatically used by EC2-Instance to store the data in it or do we have to manually do it? I know that for changing the database storage we have to change the file named mongod.conf and modify the dbpath there but I don't know what path to give there. and after that also if I destroyed that instance when I will get the EBS storage back. Thanks in advance for the help.

Apr 21, 2022 in AWS by Soham
• 9,710 points
660 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
In your screenshot, the EBS volume is the root volume for the instance. So unless you add other volumes to the instance, everything persisted on disk on that instance is going to be stored on the EBS volume. You can pick any location to store your database.
answered Apr 25, 2022 by Rahul
• 9,680 points

edited Mar 5

Related Questions In AWS

0 votes
0 answers
+1 vote
2 answers

How do I run python script on aws EC2 instance(ubuntu)?

I believe that you are using the ...READ MORE

answered Apr 17, 2018 in AWS by Cloud gunner
• 4,670 points
10,637 views
0 votes
0 answers
0 votes
1 answer

Backup solutions for AWS EC2 instances

I've been using Skeddly for several months now to ...READ MORE

answered Sep 12, 2018 in AWS by Priyaj
• 58,020 points
779 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP