MongoDB at Umbler
Welcome to Umbler's MongoDB HUB
Here you'll find plenty of tutorials about MongoDB at Umbler: From creating a database, to connecting it with your application. Check out the first steps to successfully host your MongoDB instance.
Creating a MongoDB database
The first step to create a database, is to access your Control Panel.
Once you're in the Control Panel, click on the option Domain > Site > Database.
An important tip is to select the MongoDB database on the top of the screen, where it's highlighted.
After filling all fields and choosing the size of your database, click on Finish and wait until it's created.
Connecting to my MongoDB database
Click on the database you want to connect.
Use the host information to connect:
You need to focus on what's highlighted, just copy the URL and the authentication information from the database.
Importing my MongoDB database at Umbler
In order to import your MongoDB database, you must have MongoDB installed in your computer, as well as the MongoDB dump file that you want to import.
The first step to restore the database is to open your CMD as administrator and access the folder where your MongoDB is installed.
As shown below:
The highlighted command is the default path where mongoDB is installed on Windows.
cd C:\Program Files\MongoDB\Server\3.4\bin
Once you are in the folder containing the files, issue the following command:
mongorestore -h yourExternalHostname -d yourDbName -u yourDbUsername -p yourDbPassword --drop pathToYourDump
Here's an image with a real example:
The highlighted field is the command itself, followed by the logs indicating that the restore was successful.
Exporting your MongoDB database
In order to export your MongoDB database, you must have MongoDB installed in your computer.
The first step to create the dump is to open your CMD as administrator, and access the folder where your MongoDB is installed.
As shown below:
The highlighted command is the default path where mongoDB is installed on Windows.
cd C:\Program Files\MongoDB\Server\3.4\bin
Once you are in the folder containing the files, issue the following command:
mongodump -h yourExternalHostname -d yourDbName -u yourDbUsername -p yourDbPassword --out placeToSaveTheDump
Here's an image with a real example:
The highlighted field is the command itself, followed by the logs indicating that the export process was successful.