Databases
MongoDB
Versions, defaults, connection addresses and the one database its automatic backup covers.
Updated
Cloud runs MongoDB from the official mongo image, at the major version you choose. Databases covers creating, the Connection card, passwords and public access for every engine; this page holds what is particular to MongoDB.
| Setting | MongoDB |
|---|---|
| Versions offered | 8, 7. The form lists them as "MongoDB 8" and "MongoDB 7", and chooses 8 |
| Port inside the project | 27017 |
| Database | None is created for you. The form has no Database name field, and the Connection card no Database row |
| User | app, unless you choose another before the first start |
| Password | Generated as 32 letters and digits, or your own of 12 to 128 letters, digits, dots, hyphens, underscores or tildes |
| Address scheme | mongodb:// |
| Data directory | /data/db |
Connection addresses
Copy both from the Connection card, which fills in the password, the host and the public port for you.
mongodb://app:<password>@<internal host>:27017mongodb://app:<password>@<public address>:<public port>The address names no database, because Cloud creates none. Choose the database your application uses in its driver settings.
Choosing the version
The version and the user are written into the data at the first start and cannot change after it. Choose them on the create form, or on the Connection card before you press Deploy for the first time.
Backups
Automatic backups cover one database
The create form says it: "Automatic backups cover only the default test database. Other databases need separate backup schedules." The automatic dump names the database test, not every database in the instance.
For each database your application uses, add a schedule on the Storage page under Backups with Add backup schedule, and give its name under Database name. Backups walks through the dialog.
Backup before deployment, on the database's Storage section, takes a dump before each deployment of the database, using the database of the schedule you pick.
A dump downloads as a gzip file named after the service and the time of the backup, ending in
.bson.gz.
The console's Restore is not available yet; Back up a database and restore it gives the manual path.