Hi Everyone,
I have deployed my project on Amazon EC2 machine, and its running fine. I need to know how to get the MONGO_URL for my app So that I could connect the DB with some other machine.
I have also used MLab generated MONGO_URL, and I know the pattern a MONGO_URL should have.
**mongodb://user:pass@ip_address:port/db_name**
Also, I need to generate the username and password with MONGO_URL. Please help.
@robfallows, Can you provide any suggestions here?
Sorry, I don’t use mup. However, if you’re hosting MongoDB on MLab, you will have your URL (and security details) available on there.
Thanks for your time but I can’t use mlab for existing project.
@zodern, Can you provide any suggeestion ?
So, where are you running Mongo?
Mup automatically installs Mongo, its on AWS EC2 Machine.
Okay - so is that a replica set on a single EC2 instance?
yes, its a live instance on AWS and I can’t get the db backup from it
There is more than one way to skin a cat:
1. Get the backup locally, and scp the backup out
a) In our deployed server:
$ cd ~ ; mongodump --out backups/20181124 --db < db name >
b) In your local machine (or where your backups will stay):
$ cd ~/backups ; scp -r deployed.server:backups/20181124/* 20181124/
2. Connect to mongodb remotely
What you are looking for, but consider option 1:
https://ianlondon.github.io/blog/mongodb-auth/
I personally use option 1, seems simpler and safer.
I tried this command, but not working. How to take backup of Mongodb, App deployed using Mup js I have also posted a question regarding this also.