-
Notifications
You must be signed in to change notification settings - Fork 258
feat(mdb): new docs #3776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat(mdb): new docs #3776
Changes from 5 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e81e1ce
feat(mgdb): new docs
ldecarvalho-doc caa3ff1
feat(mdb): connection
ldecarvalho-doc 6ade0e9
fix(mdb): remove pages
ldecarvalho-doc 9e21056
Revert "fix(mdb): remove pages"
ldecarvalho-doc aaac720
fix(mdb): menu
ldecarvalho-doc dac8d9d
fix(mdb): review ro
ldecarvalho-doc a8c09d9
fix(mdb): review ro 2
ldecarvalho-doc 0c39c44
fix(RDB): update
SamyOubouaziz 59d2102
fix(RDB): update
SamyOubouaziz 199d29c
fix(RDB): update
SamyOubouaziz 72774c9
Merge branch 'main' into MTA-5040
SamyOubouaziz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
110 changes: 110 additions & 0 deletions
110
managed-databases/mongodb/api-cli/backup-and-restore.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| --- | ||
| meta: | ||
| title: Back up and restore MongoDB™ Databases with MongoDB® tools | ||
| description: This page shows you how to back up and restore MongoDB™ Databases with MongoDB® command line tools | ||
| content: | ||
| h1: Back up and restore MongoDB™ Databases with MongoDB® tools | ||
| paragraph: This page shows you how to back up and restore MongoDB™ Databases with MongoDB® command line tools | ||
| tags: databases mongodb mongodb document backup database-nodes | ||
| categories: | ||
| - managed-databases | ||
| - postgresql-and-mysql | ||
| --- | ||
|
|
||
| Managed MongoDB™ Databases provide fully-managed document Database Instances, with a MongoDB®-compatible API layer over a PostgreSQL engine to store and retrieve data. | ||
|
|
||
| This means you can use MongoDB® command line tools to use and manage your MongoDB™ Databases. | ||
|
|
||
| This tutorial shows how to backup and restore your MongoDB™ Databases with the MongoDB® `mongodump` and `mongorestore` command line database tools. | ||
|
|
||
| <Macro id="requirements" /> | ||
|
|
||
| <Message type="requirement"> | ||
| - You have an account and are logged into the [Scaleway console](https://console.scaleway.com/) | ||
| - You have a [MongoDB®-compatible client](https://www.mongodb.com/try/download/shell) installed | ||
| - You have [created a MongoDB™ Database Instance](/managed-databases/mongodb/how-to/create-a-database-instance) | ||
| - You have [mongodump and mongorestore tools](https://www.mongodb.com/docs/database-tools/installation/installation/) installed | ||
| </Message> | ||
|
|
||
| <Message type="important"> | ||
| This tutorial shows you basic restore and backup operations. If you need additional options for the operations, refer to the [official MongoDB® documentation](https://www.mongodb.com/docs/manual/tutorial/backup-and-restore-tools/). | ||
|
|
||
| Make sure you keep the `--ssl` and `--sslCAFile=<file.pem>` options in your commands, as you will need to authenticate using the default SSL certificate when you connect to your Database Instance. | ||
| </Message> | ||
|
|
||
| ## How to back up a MongoDB™ Database Instance | ||
|
|
||
| To create backups, we will use the `mongodump` tool, which can create backups for an entire Database Instance, logical database or collection. It can also use a query to back up part of a collection. | ||
|
|
||
| 1. Navigate to the [Scaleway console](https://console.scaleway.com/). | ||
| 2. Click **MongoDB™ Databases** under **Managed Databases** on the side menu. A list of your Database Instances displays. | ||
| 3. Click the database name or <Icon name="more" /> > **More info** to access the Database Instance information page. | ||
| 4. Download the Database Instance's SSL certificate. | ||
| <Message type="important"> | ||
| Make sure you know the path to the certificate in your local machine, as it will be used in a later step. | ||
ldecarvalho-doc marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </Message> | ||
| 5. Run the following command, replacing the values according to the table below. | ||
| ``` | ||
| mongodump \ | ||
| --host=<ip-address> \ | ||
| --port=<port> \ | ||
| --username=<username> \ | ||
| --password="<password>" \ | ||
| --out=/path/to/backup \ | ||
| --ssl \ | ||
| --sslCAFile=<file.pem> \ | ||
| --authenticationMechanism=PLAIN | ||
| ``` | ||
|
|
||
| `host` | ||
| : the IP address of your Database Instance | ||
|
|
||
| `port` | ||
| : the connection port of your Database Instance | ||
|
|
||
| `username` | ||
| : the username of the database user created upon Database Instance creation | ||
|
|
||
| `password` | ||
| : the password of the database user created upon Database Instance creation | ||
|
|
||
| `out` | ||
| : the path to the folder where you want the backups to be stored on your machine | ||
|
|
||
| `sslCAFile` | ||
| : the path to where your SSL certificate is stored | ||
|
|
||
| `authenticationMechanism` | ||
| : the list of authentication mechanisms the server accepts | ||
|
|
||
| If no response is returned, the operation was successful. You can make sure the backup occurred by checking if new files were added to the destination folder. | ||
ldecarvalho-doc marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## How to restore from a backup | ||
|
|
||
| You can restore either an entire database backup or a subset of a backup using `mongorestore`. | ||
|
|
||
| The tool restores binary backups created using `mongodump`. | ||
|
|
||
| You can restore the backed up data to any database within any Database Instance. | ||
|
|
||
| Run the following command, replacing the values according to the table above. You must specify the name of the destination `db`. | ||
| ``` | ||
| mongorestore \ | ||
| --host=<ip-address> \ | ||
| --port=<port> \ | ||
| --username=<username> \ | ||
| --password=<password> \ | ||
| /path/to/backup \ | ||
| --db=rdb \ | ||
| --ssl \ | ||
| --sslCAFile=<file.pem> \ | ||
| --authenticationMechanism=PLAIN | ||
| ``` | ||
| `db` | ||
| : the name of the database to which you want to restore the backup | ||
|
|
||
| If the procedure was successful, you will see an output like the following: | ||
|
|
||
| ``` | ||
| 2023-09-04T17:50:29.893+0200 1 document(s) restored successfully. 0 document(s) failed to restore. | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| meta: | ||
| title: Managed MongoDB™ Databases - API/CLI Documentation | ||
| description: Managed MongoDB™ Databases API/CLI Documentation | ||
| content: | ||
| h1: Managed MongoDB™ Databases - API/CLI Documentation | ||
| paragraph: Managed MongoDB™ Databases API/CLI Documentation | ||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| --- | ||
| meta: | ||
| title: Managed MongoDB™ Databases - Concepts | ||
| description: This page explains all the concepts related to Managed MongoDB™ Databases. | ||
| content: | ||
| h1: Managed MongoDB™ Databases - Concepts | ||
| paragraph: This page explains all the concepts related to Managed MongoDB™ Databases. | ||
| tags: concepts managed-databases ferredb mongodb document | ||
| categories: | ||
| - managed-databases | ||
| --- | ||
|
|
||
| ## Block Storage Low Latency | ||
|
|
||
| Block Storage Low Latency is a storage type similar to [Basic Block Storage](#basic-block-storage) that provides lower latency and high resiliency through 5k IOPS. You can increase your volume size to up to 10 TB. | ||
|
|
||
| Refer to the [Block Storage Low Latency documentation section](/storage/block/concepts/) to learn more about this volume type. | ||
|
|
||
| <Message type="note"> | ||
| Block Low Latency volumes are only available with new-generation node types and in the PAR and AMS regions. | ||
| </Message> | ||
|
|
||
| ## Database Instance | ||
|
|
||
| A Database Instance is made up of multiple (at least 1) dedicated compute nodes, and is running a single Database Engine. Exactly one database engine is running on each node. | ||
|
|
||
| ## Database snapshot | ||
|
|
||
| A [Snapshot](/managed-databases/mongodb/how-to/manage-snapshots/) is a consistent, instantaneous copy of the Block Storage volume of your Database Instance at a certain point in time. They are designed to recover your data in case of failure or accidental alterations of the data by a user. They allow you to quickly create a new Instance from a previous state of your database, regardless of the size of the volume. Snapshots can only be stored in the same location as the original data. | ||
|
|
||
| ## Document database | ||
|
|
||
| Document databases enable users to store and retrieve data in a document format, such as json. Compared to traditional relational databases where data is stored in a table-like format, document-type storage supports storing multiple nested keys and values in each document key. | ||
|
|
||
| ## Endpoint | ||
|
|
||
| A point of connection to a database. The endpoint is associated with an IPv4 address and a port, and determines whether the endpoint is read-write or not. | ||
|
|
||
| ## Engine | ||
|
|
||
| A database engine is the software component that stores and retrieves your data from a database. Currently, MongoDB™ 7.0.11 and 7.0.12 are available. | ||
|
|
||
| ## Logs | ||
|
|
||
| Logs can contain useful information for debugging or to know more about the behavior and activity of your databases. | ||
|
|
||
| ## Managed Database | ||
|
|
||
| Compared to traditional database management, which requires customers to provision their infrastructure and resources to manage their databases, managed databases offer the user access to a Database Instance without setting up the hardware or configuring the software. | ||
|
|
||
| ## Region and Availability Zone | ||
|
|
||
| <Macro id="region-and-az" /> | ||
|
|
||
| <Message type="requirement"> | ||
| During the MongoDB™ Private Beta, only the France region is available. | ||
| </Message> | ||
|
|
||
| ## Replica-set 1-node | ||
|
|
||
| An Instance of MongoDB™ that runs as a single server and does not provide redundancy or high availability. | ||
|
|
||
| ## Replica-set 3-nodes | ||
|
|
||
| A group of 3 MongoDB™ servers (1 primary and 2 standby nodes) that maintain the same data set. Replica sets provide redundancy and high availability and are the basis for all production deployments. If the main node fails for any reason, one of the remaining standby nodes is assigned and can take over requests, reducing downtime. |
Binary file added
BIN
+41.4 KB
...ged-databases/mongodb/how-to/assets/scaleway-create-instance-from-snapshot.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+23.7 KB
managed-databases/mongodb/how-to/assets/scaleway-dbaas-pn-attached.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+21.5 KB
managed-databases/mongodb/how-to/assets/scaleway-rdb-engine-version-upgrade.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.