Skip to content

Commit e81e1ce

Browse files
feat(mgdb): new docs
1 parent a5d3130 commit e81e1ce

25 files changed

+1211
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
meta:
3+
title: Environmental Footprint Documentation
4+
description: Dive into Scaleway Environmental Footprint calculator with our quickstart guide, how-tos, and more.
5+
---
6+
7+
<ProductHeader
8+
productName="Environmental Footprint"
9+
productLogo="iam"
10+
description="yo"
11+
url="/environmental-footprint/environmental-footprint/additional-content/environmental-footprint-calculator"
12+
label="Environmental Footprint calculator breakdown"
13+
/>
14+
15+
## Getting Started
16+
17+
<Grid>
18+
<SummaryCard
19+
title="Concepts"
20+
icon="info"
21+
description="Core concepts that give you a better understanding of the Environmental Footprint calculator."
22+
label="View Concepts"
23+
url="/environmental-footprint/concepts"
24+
/>
25+
</Grid>
26+
27+
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
meta:
3+
title: Back up and restore Document Databases with MongoDB® tools
4+
description: This page shows you how to back up and restore Document Databases with MongoDB® command line tools
5+
content:
6+
h1: Back up and restore Document Databases with MongoDB® tools
7+
paragraph: This page shows you how to back up and restore Document Databases with MongoDB® command line tools
8+
tags: databases mongodb ferretdb document backup database-nodes
9+
categories:
10+
- managed-databases
11+
- postgresql-and-mysql
12+
---
13+
14+
Managed Document Databases provide fully-managed document Database Instances, with a MongoDB®-compatible API layer over a PostgreSQL engine to store and retrieve data.
15+
16+
This means you can use MongoDB® command line tools to use and manage your Document Databases.
17+
18+
This tutorial shows how to backup and restore your Document Databases with the MongoDB® `mongodump` and `mongorestore` command line database tools.
19+
20+
<Macro id="requirements" />
21+
22+
<Message type="requirement">
23+
- You have an account and are logged into the [Scaleway console](https://console.scaleway.com/)
24+
- You have a [MongoDB®-compatible client](https://www.mongodb.com/try/download/shell) installed
25+
- You have [created a Document Database Instance](/managed-databases/document-database/how-to/create-a-database-instance)
26+
- You have [mongodump and mongorestore tools](https://www.mongodb.com/docs/database-tools/installation/installation/) installed
27+
</Message>
28+
29+
<Message type="important">
30+
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/).
31+
32+
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.
33+
</Message>
34+
35+
## How to back up a Document Database Instance
36+
37+
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.
38+
39+
1. Navigate to the [Scaleway console](https://console.scaleway.com/).
40+
2. Click **Document Databases** under **Managed Databases** on the side menu. A list of your Database Instances displays.
41+
3. Click the database name or <Icon name="more" /> > **More info** to access the Database Instance information page.
42+
4. Download the Database Instance's SSL certificate.
43+
<Message type="important">
44+
Make sure you know the path to the certificate in your local machine, as it will be used in a later step.
45+
</Message>
46+
5. Run the following command, replacing the values according to the table below.
47+
```
48+
mongodump \
49+
--host=<ip-address> \
50+
--port=<port> \
51+
--username=<username> \
52+
--password="<password>" \
53+
--out=/path/to/backup \
54+
--ssl \
55+
--sslCAFile=<file.pem> \
56+
--authenticationMechanism=PLAIN
57+
```
58+
59+
`host`
60+
: the IP address of your Database Instance
61+
62+
`port`
63+
: the connection port of your Database Instance
64+
65+
`username`
66+
: the username of the database user created upon Database Instance creation
67+
68+
`password`
69+
: the password of the database user created upon Database Instance creation
70+
71+
`out`
72+
: the path to the folder where you want the backups to be stored on your machine
73+
74+
`sslCAFile`
75+
: the path to where your SSL certificate is stored
76+
77+
`authenticationMechanism`
78+
: the list of authentication mechanisms the server accepts
79+
80+
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.
81+
82+
## How to restore from a backup
83+
84+
You can restore either an entire database backup or a subset of a backup using `mongorestore`.
85+
86+
The tool restores binary backups created using `mongodump`.
87+
88+
You can restore the backed up data to any database within any Database Instance.
89+
90+
Run the following command, replacing the values according to the table above. You must specify the name of the destination `db`.
91+
```
92+
mongorestore \
93+
--host=<ip-address> \
94+
--port=<port> \
95+
--username=<username> \
96+
--password=<password> \
97+
/path/to/backup \
98+
--db=rdb \
99+
--ssl \
100+
--sslCAFile=<file.pem> \
101+
--authenticationMechanism=PLAIN
102+
```
103+
`db`
104+
: the name of the database to which you want to restore the backup
105+
106+
If the procedure was successful, you will see an output like the following:
107+
108+
```
109+
2023-09-04T17:50:29.893+0200 1 document(s) restored successfully. 0 document(s) failed to restore.
110+
```
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
meta:
3+
title: Managed Document Databases - API/CLI Documentation
4+
description: Managed Document Databases API/CLI Documentation
5+
content:
6+
h1: Managed Document Databases - API/CLI Documentation
7+
paragraph: Managed Document Databases API/CLI Documentation
8+
---
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
meta:
3+
title: Managed Document Databases - Concepts
4+
description: This page explains all the concepts related to Managed Document Databases.
5+
content:
6+
h1: Managed Document Databases - Concepts
7+
paragraph: This page explains all the concepts related to Managed Document Databases.
8+
tags: concepts managed-databases ferredb mongodb document
9+
categories:
10+
- managed-databases
11+
---
12+
13+
## Block Storage Low Latency
14+
15+
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.
16+
17+
Refer to the [Block Storage Low Latency documentation section](/storage/block/concepts/) to learn more about this volume type.
18+
19+
<Message type="note">
20+
Block Low Latency volumes are only available with new-generation node types and in the PAR and AMS regions.
21+
</Message>
22+
23+
## Database Instance
24+
25+
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.
26+
27+
## Database snapshot
28+
29+
A [Snapshot](/managed-databases/document-database/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.
30+
31+
## Document database
32+
33+
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.
34+
35+
## Endpoint
36+
37+
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.
38+
39+
## Engine
40+
41+
A database engine is the software component that stores and retrieves your data from a database. Currently, FerretDB 1.2.0 is available. It runs on PostgreSQL 14.8. Users do not have direct access to the PostgreSQL layer when using FerretDB.
42+
43+
## Logs
44+
45+
Logs can contain useful information for debugging or to know more about the behavior and activity of your databases.
46+
47+
## Managed Database
48+
49+
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.
50+
51+
## Region and Availability Zone
52+
53+
<Macro id="region-and-az" />
54+
55+
<Message type="requirement">
56+
During the MongoDB™ Private Beta, only the France region is available.
57+
</Message>
58+
59+
## Replica-set 1-node
60+
61+
An Instance of MongoDB™ that runs as a single server and does not provide redundancy or high availability.
62+
63+
## Replica-set 3-nodes
64+
65+
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.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
meta:
3+
title: How to create a database
4+
description: This page explains how to create a database
5+
content:
6+
h1: How to create a database
7+
paragraph: This page explains how to create a database
8+
tags: managed-database database postgresql ferretdb database-instance mongodb
9+
dates:
10+
validation: 2024-02-08
11+
posted: 2023-08-01
12+
categories:
13+
- managed-databases
14+
---
15+
16+
<Macro id="requirements" />
17+
18+
<Message type="requirement">
19+
- You have an account and are logged into the [Scaleway console](https://console.scaleway.com)
20+
- You have a [Document Database Instance](/managed-databases/document-database/quickstart)
21+
</Message>
22+
23+
1. Click **Document Databases** under **Managed Databases** on the side menu. A list of your Database Instances displays.
24+
2. Click the Database Instance name or <Icon name="more" /> > **More info** to access the Database Instance information page.
25+
3. Go to the **Databases** tab. A list of your databases displays. The list includes the database created by default upon Database Instance creation.
26+
4. Click **+ Create database** to create a new one. A pop-up appears.
27+
5. Enter a name for your database.
28+
29+
The new database appears in the list of your databases.
30+
31+
<Navigation title="See also">
32+
<PreviousButton to="/managed-databases/document-database/how-to/connect-database-instance">How to connect to a Document Database Instance</PreviousButton>
33+
<NextButton to="/managed-databases/document-database/how-to/add-users">How to add users</NextButton>
34+
</Navigation>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
meta:
3+
title: How to add users to a Document Database Instance
4+
description: This page explains how to add users to a Document Database Instance
5+
content:
6+
h1: How to add users to a Document Database Instance
7+
paragraph: This page explains how to add users to a Document Database Instance
8+
tags: managed-database database postgresql ferretdb database-instance mongodb
9+
dates:
10+
validation: 2024-02-08
11+
posted: 2023-08-01
12+
categories:
13+
- managed-databases
14+
---
15+
16+
Users can connect to a database and access its data. Each user has a different set of customizable permissions.
17+
18+
<Macro id="requirements" />
19+
20+
<Message type="requirement">
21+
- You have an account and are logged into the [Scaleway console](https://console.scaleway.com)
22+
- You have a [Document Database Instance](/managed-databases/document-database/quickstart)
23+
</Message>
24+
25+
1. Click **Document Databases** under **Managed Databases** on the side menu. A list of your Database Instances displays.
26+
2. Click the database name or <Icon name="more" /> > **More info** to access the Database Instance information page.
27+
3. Go to the **Users** tab. A list of users displays. If it is the first time you are creating a user, your list will display the user you set up during the creation of your Database Instance.
28+
4. Click <Icon name="plus" /> to create a new user.
29+
5. Click <Icon name="toggle" /> to grant admin rights to the user.
30+
<Message type="note">
31+
Admin rights allow a user to create logical databases and users. These rights do not override the permissions configured for the logical databases. Logical database permissions must be set up in the permissions tab.
32+
</Message>
33+
6. Enter the `username` and `password`.
34+
<Message type="note">
35+
Optionally, you can configure the appropriate permissions according to the user.
36+
Three types of permissions are available:
37+
- **None:** No access to the database
38+
- **Read:** Allow users to read tables and fields in a database
39+
- **Write:** Allow users to write content in databases
40+
You can select the permission type in the Permissions tab.
41+
</Message>
42+
7. Click **Create a user** to confirm.
43+
44+
Once the user is created, it is displayed in the user list.
45+
46+
To update the password, the permissions or delete the user, click <Icon name="more" /> to display the respective options.
47+
48+
<Navigation title="See also">
49+
<PreviousButton to="/managed-databases/document-database/how-to/add-a-database">How to create a database</PreviousButton>
50+
<NextButton to="/managed-databases/document-database/how-to/manage-permissions/">How to manage user permissions</NextButton>
51+
</Navigation>
41.4 KB
Loading
20.8 KB
Loading
23.7 KB
Loading
21.5 KB
Loading

0 commit comments

Comments
 (0)