diff --git a/changelog/databases/november2022/2022-11-18-mysqlpgsql-changed-read-replica.mdx b/changelog/databases/november2022/2022-11-18-mysqlpgsql-changed-read-replica.mdx index bd9deaf6c1..b68f659b26 100644 --- a/changelog/databases/november2022/2022-11-18-mysqlpgsql-changed-read-replica.mdx +++ b/changelog/databases/november2022/2022-11-18-mysqlpgsql-changed-read-replica.mdx @@ -9,4 +9,4 @@ category: databases product: postgresql-and-mysql --- -Add up to three Read Replicas to your PostgreSQL or MySQL Instance and offload your main node from read requests. Follow the how-to to [create your first Read Replica](/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replicas/). +Add up to three Read Replicas to your PostgreSQL or MySQL Instance and offload your main node from read requests. Follow the how-to to [create your first Read Replica](/managed-databases-for-postgresql-and-mysql/how-to/create-read-replica/). diff --git a/changelog/databases/september2022/2022-09-13-pnm-added-read-replica.mdx b/changelog/databases/september2022/2022-09-13-pnm-added-read-replica.mdx index 1845b8ee87..496ff8e69d 100644 --- a/changelog/databases/september2022/2022-09-13-pnm-added-read-replica.mdx +++ b/changelog/databases/september2022/2022-09-13-pnm-added-read-replica.mdx @@ -9,4 +9,4 @@ category: databases product: postgresql-and-mysql --- -Read Replicas are now available for Managed Database for PostgreSQL and MySQL. Follow the how-to to [create your first Read Replica](/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replicas/). +Read Replicas are now available for Managed Database for PostgreSQL and MySQL. Follow the how-to to [create your first Read Replica](/managed-databases-for-postgresql-and-mysql/how-to/create-read-replica/). diff --git a/changelog/february2025/2025-02-24-mongodb-added-vpc-x-managed-mongodbr-integration.mdx b/changelog/february2025/2025-02-24-mongodb-added-vpc-x-managed-mongodbr-integration.mdx index 1784be9e66..6fb2174d86 100644 --- a/changelog/february2025/2025-02-24-mongodb-added-vpc-x-managed-mongodbr-integration.mdx +++ b/changelog/february2025/2025-02-24-mongodb-added-vpc-x-managed-mongodbr-integration.mdx @@ -9,5 +9,5 @@ category: databases product: mongodb --- -VPC is now integrated with Managed MongoDB®, allowing you to attach a database instance to a Private Network. Refer to [the dedicated documentation](/managed-mongodb-databases/how-to/connect-database-instance/#how-to-connect-to-a-database-instance-through-a-private-network/) to learn how to set it up. +VPC is now integrated with Managed MongoDB®, allowing you to attach a database instance to a Private Network. Refer to [the dedicated documentation](/managed-mongodb-databases/how-to/connect-database-private-network/) to learn how to set it up. diff --git a/changelog/september2023/2023-09-19-postgresql-and-mysql-added-cross-availability-zone-read.mdx b/changelog/september2023/2023-09-19-postgresql-and-mysql-added-cross-availability-zone-read.mdx index 3784b617de..75703fb489 100644 --- a/changelog/september2023/2023-09-19-postgresql-and-mysql-added-cross-availability-zone-read.mdx +++ b/changelog/september2023/2023-09-19-postgresql-and-mysql-added-cross-availability-zone-read.mdx @@ -10,6 +10,6 @@ product: postgresql-and-mysql --- The Cross-AZ Read Replica feature ensures your data is replicated in a dedicated read-only node, which is located in another AZ within the same Region as your main node. - - For more information, refer to the [How to create Read Replicas](/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replicas/) documentation page. + + For more information, refer to the [How to create Read Replicas](/managed-databases-for-postgresql-and-mysql/how-to/create-read-replica/) documentation page. diff --git a/menu/navigation.json b/menu/navigation.json index e47d0f6df0..69a93b21be 100644 --- a/menu/navigation.json +++ b/menu/navigation.json @@ -2122,41 +2122,57 @@ "label": "Connect to a Database Instance", "slug": "connect-database-instance" }, + { + "label": "Connect a Database Instance to a Private Network", + "slug": "connect-database-private-network" + }, { "label": "Create a database", "slug": "add-a-database" }, { - "label": "Manage users", - "slug": "manage-users" + "label": "Add users", + "slug": "add-users" }, { - "label": "Manage volumes", - "slug": "manage-volumes" + "label": "Manage permissions", + "slug": "manage-permissions" }, { - "label": "Manage nodes", - "slug": "manage-nodes" + "label": "Manage allowed IPs", + "slug": "manage-allowed-ip-addresses" }, { - "label": "Manage backups", - "slug": "manage-backups" + "label": "Monitor Database Instances with Cockpit", + "slug": "monitor-databases-cockpit" }, { - "label": "Manage snapshots", - "slug": "manage-snapshots" + "label": "Change the volume type", + "slug": "change-volume-type" }, { - "label": "Manage Read Replicas", - "slug": "manage-read-replicas" + "label": "Enable Autobackup", + "slug": "enable-autobackup" + }, + { + "label": "Manage manual backups", + "slug": "manage-manual-backups" + }, + { + "label": "Manage snapshots", + "slug": "manage-snapshots" }, { "label": "Clone a Database Instance", "slug": "clone-a-database-instance" }, { - "label": "Manage allowed IPs", - "slug": "manage-allowed-ip-addresses" + "label": "Create Read Replicas", + "slug": "create-read-replica" + }, + { + "label": "Manage Read Replicas", + "slug": "manage-read-replica" }, { "label": "Configure advanced settings", @@ -2167,13 +2183,17 @@ "slug": "renew-tls-certificate" }, { - "label": "Monitor Database Instances with Cockpit", - "slug": "monitor-databases-cockpit" + "label": "Upgrade a Database Instance", + "slug": "upgrade-a-database" }, { - "label": "Upgrade Database Instance engine versions", + "label": "Upgrade Database Instance engine version", "slug": "upgrade-version" }, + { + "label": "Enable High Availability", + "slug": "enable-high-availability" + }, { "label": "Apply scheduled maintenance", "slug": "apply-maintenance" diff --git a/pages/kubernetes/reference-content/secure-cluster-with-private-network.mdx b/pages/kubernetes/reference-content/secure-cluster-with-private-network.mdx index ee2268746b..4859b0dbee 100644 --- a/pages/kubernetes/reference-content/secure-cluster-with-private-network.mdx +++ b/pages/kubernetes/reference-content/secure-cluster-with-private-network.mdx @@ -73,7 +73,7 @@ Yes, they are. Since July 2023, the automatic allocation of IP addresses via IPA For any new Private Networks you create and attach to Managed Databases after July 2023, your private IP addresses are automatically allocated. -If you have set up Private Network endpoints for your Managed Databases before July 2023, and want to connect to Kapsule via a Private Network, you must first delete your old Private Network endpoint. Then, you can create a new one, either via the [Scaleway console](/managed-databases-for-postgresql-and-mysql/how-to/connect-database-instance/#how-to-connect-to-a-database-instance-through-a-private-network/#how-to-attach-a-database-instance-to-a-private-network) or API. +If you have set up Private Network endpoints for your Managed Databases before July 2023, and want to connect to Kapsule via a Private Network, you must first delete your old private network endpoint. Then, you can create a new one, either via the [Scaleway console](/managed-databases-for-postgresql-and-mysql/how-to/connect-database-private-network/#how-to-attach-a-database-instance-to-a-private-network) or API. In the example below, we show you how to do so via the API. We specify the automated configuration of your Private Network via IPAM using `"ipam_config": {},`. diff --git a/pages/managed-databases-for-postgresql-and-mysql/api-cli/using-pgcron.mdx b/pages/managed-databases-for-postgresql-and-mysql/api-cli/using-pgcron.mdx index a0bcaf5b5a..c816df3bc0 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/api-cli/using-pgcron.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/api-cli/using-pgcron.mdx @@ -37,7 +37,7 @@ CREATE EXTENSION To fully use the extension, you must grant read/write rights to the user who will be running the `pg_cron` functions to manage jobs on the database. - Refer to the [How to add users to a PostgreSQL or MySQL Database Instance](/managed-databases-for-postgresql-and-mysql/how-to/manage-users) documentation for more information. + Refer to the [How to add users to a PostgreSQL or MySQL Database Instance](/managed-databases-for-postgresql-and-mysql/how-to/add-users) documentation for more information. ## Scheduling jobs diff --git a/pages/managed-databases-for-postgresql-and-mysql/concepts.mdx b/pages/managed-databases-for-postgresql-and-mysql/concepts.mdx index cd1cf623cd..0af888dd46 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/concepts.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/concepts.mdx @@ -76,7 +76,7 @@ The HA standby node is linked to the main node, using synchronous replication. S - HA standby nodes are not accessible to users unless the main node becomes unavailable and the standby takes over. If you wish to run queries on a read-only node, you can use [Read Replicas](/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replicas/). + HA standby nodes are not accessible to users unless the main node becomes unavailable and the standby takes over. If you wish to run queries on a read-only node, you can use [Read Replicas](/managed-databases-for-postgresql-and-mysql/how-to/create-read-replica/). ## Local Storage diff --git a/pages/managed-databases-for-postgresql-and-mysql/faq.mdx b/pages/managed-databases-for-postgresql-and-mysql/faq.mdx index f518a45cf2..23b8db11b9 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/faq.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/faq.mdx @@ -110,7 +110,7 @@ Database Instances supports IP provisioning using IPAM. With this mode, a privat No, the second node created when you activate the HA on your Managed Database Instance is a hot standby. This node allows a fast failover in case of issues on the primary node. -You can use the [Read Replica feature](/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replicas/). +You can use the [Read Replica feature](/managed-databases-for-postgresql-and-mysql/how-to/create-read-replica/). ## If my main node becomes unavailable, is my Read Replica automatically promoted to the main node? @@ -118,7 +118,7 @@ No. To promote a Read Replica to the main node, follow the [How to promote a Rea ## Why is my number of active backups/snapshots exceeding the quota? -When [autobackup](/managed-databases-for-postgresql-and-mysql/how-to/manage-backups), or autosnapshot, is enabled for your local or Block volumes, regular quota limitations for backups and snapshots do not apply. +When [autobackup](/managed-databases-for-postgresql-and-mysql/how-to/enable-autobackup), or autosnapshot, is enabled for your local or Block volumes, regular quota limitations for backups and snapshots do not apply. Quotas exist to protect Scaleway from abuse, and to protect your Scaleway resources from the unlikely event of malicious behavior by users in your Organization. diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-users.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/add-users.mdx similarity index 52% rename from pages/managed-databases-for-postgresql-and-mysql/how-to/manage-users.mdx rename to pages/managed-databases-for-postgresql-and-mysql/how-to/add-users.mdx index f6c4fbba8c..d18ca87c60 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-users.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/add-users.mdx @@ -1,9 +1,9 @@ --- -title: How to manage database users -description: Steps to add and manage users on your PostgreSQL and MySQL databases. +title: How to add users to a PostgreSQL or MySQL Database Instance +description: Steps to add users to your PostgreSQL and MySQL databases. tags: managed-database database postgresql mysql database-instance dates: - validation: 2025-08-07 + validation: 2025-02-11 posted: 2019-09-21 --- import Requirements from '@macros/iam/requirements.mdx' @@ -17,8 +17,6 @@ Users can connect to a database and access its data. Each one has a different se - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization - A [PostgreSQL or MySQL Database Instance](/managed-databases-for-postgresql-and-mysql/quickstart/) -## How to create a user - 1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. 2. Select the geographical region of the Instance you want to manage from the drop-down. 3. Click the database name or > **More info** to access the Database Instance information page. @@ -38,33 +36,10 @@ Users can connect to a database and access its data. Each one has a different se You can select the permission type in the Permissions tab. - - - PostgreSQL Permissions are applied to existing items **at the moment the configuration is set**. They cannot be applied to any items created afterward. - When you add database objects like tables or sequences, your configured permissions are automatically set to **Custom**. The **Custom** setting ensures that your permissions are still valid for items created before you reconfigured your Database. - You can use [PostgreSQL default privileges](https://www.postgresql.org/docs/current/sql-alterdefaultprivileges.html) to set default privileges for future objects. - 8. Click **Create user** to confirm. Once the user is created, it is displayed in the user list. To update the password, the permissions or delete the user, click to display the respective options. -## Set permissions for an existing user -Permissions define the actions a user can perform on a logical database. A database user is automatically generated when you create your Database Instance, to whom the permissions are attributed. However, newly created users have no permissions by default. - -1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. -2. Select the geographical region of the Instance you want to manage from the drop-down. -3. Click the database name or > **More info** to access the Database Instance information page. -4. Go to the **Users** tab. A list of users displays. -5. Click > **Update permissions** to open the user permissions panel. -6. Select the appropriate permissions for each database. - - Three types of permissions are available: - - **None:** No access to the database - - **Read:** Allow users to read tables and fields in a database - - **Read/Write:** Allow users to read/write content in databases - - **All:** Allows the creation of schemas and tables. - -7. Click **Update user** to confirm. diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-volumes.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/change-volume-type.mdx similarity index 67% rename from pages/managed-databases-for-postgresql-and-mysql/how-to/manage-volumes.mdx rename to pages/managed-databases-for-postgresql-and-mysql/how-to/change-volume-type.mdx index c0ce60719b..a531168db5 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-volumes.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/change-volume-type.mdx @@ -1,32 +1,33 @@ --- -title: How to manage volumes -description: This page explains how to manage the volumes of your Database Instances +title: How to change the volume type of your Database +description: This page explains how to change the volume type of your Database tags: managed-database database volume-type dates: - validation: 2025-08-07 - posted: 2025-08-07 + validation: 2025-07-15 + posted: 2021-03-10 --- import Requirements from '@macros/iam/requirements.mdx' +It is possible to change your [volume type](/managed-databases-for-postgresql-and-mysql/concepts/#volume-type) anytime in the Scaleway console. + - A Scaleway account logged into the [console](https://console.scaleway.com) - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization - A [PostgreSQL or MySQL Database Instance](/managed-databases-for-postgresql-and-mysql/quickstart/) with local Storage - -## How to change the volume type - -### Important information +## Important information Since there are different types of volumes for Database Instances, make sure you are aware of the following information before changing the volume type: - When autobackup is enabled for your local or Block volumes, regular quota limitations for backups and snapshots do not apply. Refer to the [Managed Databases FAQ page](/managed-databases-for-postgresql-and-mysql/faq/#why-is-my-number-of-active-backupssnapshots-exceeding-the-quota) for more information. -- When switching from a local volume to a Block volume, and if [Autobackup](/managed-databases-for-postgresql-and-mysql/how-to/manage-backups/) is enabled, be aware that the snapshot type will change. Local volumes use logical backups, whereas Block Storage employs snapshots. Both types are priced at €0.03 per GB per month, but their distinct backup methods affect storage space differently, influencing the final monthly cost based on your usage. +- When switching from a local volume to a Block volume, and if [Autobackup](/managed-databases-for-postgresql-and-mysql/how-to/enable-autobackup/) is enabled, be aware that the snapshot type will change. Local volumes use logical backups, whereas Block Storage employs snapshots. Both types are priced at €0.03 per GB per month, but their distinct backup methods affect storage space differently, influencing the final monthly cost based on your usage. - Disk size cannot be reduced. Therefore, when switching from local to Block, the volume size remains the same by default. - When switching from a Block to a local volume, make sure to select a node with a local Storage with size equal or greater than your current Block Storage. If you choose a Database Instance type with a local volume larger than your current block volume, you will be billed for the full capacity of the Database Instance. -It is possible to change your [volume type](/managed-databases-for-postgresql-and-mysql/concepts/#volume-type) anytime in the Scaleway console. + + +## How to change the volume type 1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. 2. Select the geographical region of the Instance you want to manage from the drop-down. @@ -41,9 +42,10 @@ It is possible to change your [volume type](/managed-databases-for-postgresql-an 5. Select **Block Storage** from the drop-down menu. 6. Click **Update volume type** to confirm. - The Database Instance goes into the `Initializing` state and remains available during the process. The time it takes to complete the process may vary, depending on the size of the volume. + The Database Instance goes into the `Initializing` state. -### The volume changing process + +## The volume changing process During the process: @@ -55,15 +57,3 @@ During the process: - When all the data is synchronized, a switchover is performed between nodes of the cluster. This means that the database will be unavailable few dozen of seconds during at this time. -## How to increase a Block Storage volume - -1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. -2. Select the geographical region of the Instance you want to manage from the drop-down. -3. Click the name of the Database Instance you want to configure. The Database Instance overview page displays. -4. Scroll down to **Volume settings**. -5. Specify your volume capacity (in GB). The amount you define will be your new volume capacity. - - - You can increase your Block Storage volume to up to 10 TB. - - Block volume sizes cannot be decreased. - -6. Click **Increase volume size** to confirm. diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/connect-database-instance.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/connect-database-instance.mdx index 70bc344c34..d802b5bf6f 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/how-to/connect-database-instance.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/connect-database-instance.mdx @@ -3,22 +3,18 @@ title: How to connect to a Database Instance description: Learn how to connect to your PostgreSQL and MySQL Database Instances. tags: postgresql mysql database-instance managed-database database dates: - validation: 2025-07-08 + validation: 2025-03-11 posted: 2023-02-16 --- import Requirements from '@macros/iam/requirements.mdx' -import SshBastion from '@macros/databases/ssh-bastion.mdx' - A Scaleway account logged into the [console](https://console.scaleway.com) - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization -- A valid [API key](/iam/how-to/create-api-keys/) - A [PostgreSQL or MySQL Database Instance](/managed-databases-for-postgresql-and-mysql/quickstart/) -## How to connect to a Database Instance through the public network - 1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. 2. Select the geographical region of the Instance you want to manage from the drop-down. 3. Click the database name or > **More info** to access the Database Instance information page. @@ -41,65 +37,4 @@ import SshBastion from '@macros/databases/ssh-bastion.mdx' You are now connected to your Managed Database. -## How to connect to a Database Instance through a Private Network - -[Private Networks](/vpc/concepts/#private-networks) allows you to enhance the security of your system's architecture by isolating it from the internet. - -When using Private Networks, your application connects directly to your Database nodes without going through a Load Balancer. - -This improves performance by reducing the latency between your application and your database nodes. It also increases the security of your databases, as Instances in your Private Network can directly communicate with your Database Instance, without passing through the public internet. - -You can create new Database Instances to attach to your Private Network, or attach existing ones. - - - Managed PostgreSQL and MySQL Database Instances created after July 28th 2025 are compatible with the [VPC routing](/vpc/concepts/#routing) feature, which allows you to connect one or more Database Instances in a Private Network to resources in other Private Networks of the same VPC. Maintenance scheduled for later in August 2025 will make all pre-existing Managed PostgreSQL and MySQL Database Instances compatible as well. Refer to the [How to manage routing](/vpc/how-to/manage-routing/) documentation page for more information about VPC routing. - - -### How to attach a Database Instance to a Private Network - - - You can only attach your Database Instance to one Private Network at a time. - - -1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. -2. Select the geographical region of the Instance you want to manage from the drop-down. -3. Click the database name or > **More info** to access the Database Instance information page. -4. Scroll to the **Network** section. - - Alternatively, you can follow the next steps from the **Private Networks** tab. Click **+ Attach to a Private Network** to open the configuration pop-up. - -5. Click **Attach Private Network** next to **Private endpoint**. A pop-up appears. -6. Choose whether to: - - Select and attach an existing Private Network and select the network from the drop-down list. - - The Database Instance must be attached to a Private Network in the same region. - - - Create and attach a new Private Network and enter the name of the network in the form. - - If you select this option, a Private Network with default settings will be created in the same region as your Database Instance. Do not use a TLD (e.g. dev, cloud) as a name, to avoid conflicts. - - - - Your private IP addresses are automatically allocated. They are managed via an IP Address Manager (IPAM). You can retrieve them on the Private Network tab of your Database Instance. To allocate IPs manually, you can use the Scaleway API and CLI, or Terraform/OpenTofu. - -7. Click **Attach to Private Network** to conclude. - -### How to connect to a Database Instance through a Public Gateway - - - -### How to detach a Database Instance from a Private Network - -1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. -2. Select the geographical region of the Instance you want to manage from the drop-down. -3. Click the database name or > **More info** to access the Database Instance information page. -4. Click the **Private Networks** tabs. The Private Network configuration displays. -5. Click next to the static IP that you want to unlink from your Database Instance. -6. Click **Detach resource** to remove the Instance from your Private Network. - -This action takes a few moments to complete. During this time, your Database Instance: - - remains available, - - goes into **Configuring** mode, and - - all Database Instance configuration becomes unavailable - \ No newline at end of file diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/connect-database-private-network.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/connect-database-private-network.mdx new file mode 100644 index 0000000000..0611c53681 --- /dev/null +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/connect-database-private-network.mdx @@ -0,0 +1,78 @@ +--- +title: How to connect a PostgreSQL and MySQL Database Instance to a Private Network +description: Instructions for connecting your Database Instance over a Private Network. +tags: managed-database postgresql mysql private-network database-instance +dates: + validation: 2025-07-15 + posted: 2019-11-15 +--- +import SshBastion from '@macros/databases/ssh-bastion.mdx' +import Requirements from '@macros/iam/requirements.mdx' + + +[Private Networks](/vpc/concepts/#private-networks) allows you to enhance the security of your system's architecture by isolating it from the internet. + +When using Private Networks, your application connects directly to your Database nodes without going through a Load Balancer. + +This improves performance by reducing the latency between your application and your database nodes. It also increases the security of your databases, as Instances in your Private Network can directly communicate with your Database Instance, without passing through the public internet. + +You can create new Database Instances to attach to your Private Network, or attach existing ones. + + + Managed PostgreSQL and MySQL Database Instances created after July 28th 2025 are compatible with the [VPC routing](/vpc/concepts/#routing) feature, which allows you to connect one or more Database Instances in a Private Network to resources in other Private Networks of the same VPC. Maintenance scheduled for later in August 2025 will make all pre-existing Managed PostgreSQL and MySQL Database Instances compatible as well. Refer to the [How to manage routing](/vpc/how-to/manage-routing/) documentation page for more information about VPC routing. + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- A valid [API key](/iam/how-to/create-api-keys/) +- A [PostgreSQL or MySQL Database Instance](/managed-databases-for-postgresql-and-mysql/quickstart/) + +## How to attach a Database Instance to a Private Network + + + You can only attach your Database Instance to one Private Network at a time. + + +1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. +2. Select the geographical region of the Instance you want to manage from the drop-down. +3. Click the database name or > **More info** to access the Database Instance information page. +4. Scroll to the **Network** section. + + Alternatively, you can follow the next steps from the **Private Networks** tab. Click **+ Attach to a Private Network** to open the configuration pop-up. + +5. Click **Attach Private Network** next to **Private endpoint**. A pop-up appears. +6. Choose whether to: + - Select and attach an existing Private Network and select the network from the drop-down list. + + The Database Instance must be attached to a Private Network in the same region. + + - Create and attach a new Private Network and enter the name of the network in the form. + + If you select this option, a Private Network with default settings will be created in the same region as your Database Instance. Do not use a TLD (e.g. dev, cloud) as a name, to avoid conflicts. + + + + Your private IP addresses are automatically allocated. They are managed via an IP Address Manager (IPAM). You can retrieve them on the Private Network tab of your Database Instance. To allocate IPs manually, you can use the Scaleway API and CLI, or Terraform/OpenTofu. + +7. Click **Attach to Private Network** to conclude. + +## How to connect to a Database Instance through a Public Gateway + + + +## How to detach a Database Instance from a Private Network + +1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. +2. Select the geographical region of the Instance you want to manage from the drop-down. +3. Click the database name or > **More info** to access the Database Instance information page. +4. Click the **Private Networks** tabs. The Private Network configuration displays. +5. Click next to the static IP that you want to unlink from your Database Instance. +6. Click **Detach resource** to remove the Instance from your Private Network. + + +This action takes a few moments to complete. During this time, your Database Instance: + - remains available, + - goes into **Configuring** mode, and + - network configuration actions become unavailable + diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/create-a-database.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/create-a-database.mdx index 46c1ba39ea..13043403d2 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/how-to/create-a-database.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/create-a-database.mdx @@ -3,7 +3,7 @@ title: How to create a PostgreSQL or MySQL Database Instance description: Step-by-step guide to creating a PostgreSQL or MySQL Database Instance on Scaleway. tags: postgresql mysql database-instance managed-database database dates: - validation: 2025-08-07 + validation: 2025-02-11 posted: 2019-05-11 --- import Requirements from '@macros/iam/requirements.mdx' @@ -52,7 +52,7 @@ Compared to traditional database management, which requires customers to provide The Local Storage option is only available with the first generation node types. - - Select the snapshot configuration. You can either leave the default **Automatic** option to enable [autobackups](/managed-databases-for-postgresql-and-mysql/how-to/manage-backups/), or select [Manual snapshots](/managed-databases-for-postgresql-and-mysql/how-to/manage-snapshots/). + - Select the snapshot configuration. You can either leave the default **Automatic** option to enable [autobackups](/managed-databases-for-postgresql-and-mysql/how-to/enable-autobackup/), or select [Manual snapshots](/managed-databases-for-postgresql-and-mysql/how-to/manage-snapshots/). - Add a name and set a password for your user. Your username and password must adhere to specific criteria. @@ -64,21 +64,4 @@ Compared to traditional database management, which requires customers to provide - one number - Enter a name for your Instance. -5. Click **Create Database Instance** to confirm your choices and launch creation. - -## How to create a Database Instance from a snapshot - -You can restore the data contained in a snapshot to a Database Instance. When you do so, a new Database Instance is created and billed to your account. - -1. Go to the **Snapshots** tab of your Database Instance of choice. -2. Click the next to the name of the snapshot. -3. Click **Create Database Instance from snapshot**. A pop-up appears. -4. Enter a name for your new Instance or leave the name suggested by Scaleway. -5. Choose a node type and configuration. - - It is possible to select a different (larger or smaller) node type for your new Instance. However, the Block volume size will be the same as the size of the restored snapshot. All Instance settings will be restored if you chose a node type with the same or more memory size than the initial Instance. Settings will be reset to the default if your node type has less memory. - -6. Click **Create Database Instance** to confirm. - - You can see the new Instance in your Database Instances list. - +5. Click **Create Database Instance** to confirm your choices and launch creation. \ No newline at end of file diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/create-read-replica.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/create-read-replica.mdx new file mode 100644 index 0000000000..764695dd4f --- /dev/null +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/create-read-replica.mdx @@ -0,0 +1,53 @@ +--- +title: How to create Read Replicas +description: Learn how to create Read Replicas for PostgreSQL and MySQL databases. +tags: managed-database read-replica read replicas +dates: + validation: 2025-07-15 + posted: 2022-09-01 +--- +import Requirements from '@macros/iam/requirements.mdx' + + +A Read Replica is a live copy of a Database Instance that behaves like an Instance, but that only allows read-only connections. The replica mirrors the data of the primary Database node and any changes made are replicated to the replica asynchronously. + +Read Replicas allow you to scale your Database Instance for read-heavy database workloads. They can also be used for business intelligence workloads. + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- A [PostgreSQL or MySQL Database Instance](/managed-databases-for-postgresql-and-mysql/quickstart/) + +1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. +2. Select the geographical region of the Instance you want to manage from the drop-down. +3. Click the database name or > **More info** to access the Database Instance information page. +4. Scroll down to the **Read Replica** section. +5. Click **Create Read Replica**. A pop-up displays. +6. Select the Availability Zone (AZ) configuration. Two configurations are available: + + - **Same AZ**: Your Read Replica is hosted in the same AZ as your main Database Instance. We recommend this option for low-latency workflows. + - **Multi-AZ**: Your Read Replica is hosted in a different AZ, ensuring the resilience of your Replica. We recommend this option for ensuring the availability of your infrastructure, and improving your disaster recovery plan. + +7. Select the network type. Two types are available: + + - **Public network** - Resources in a public network are publicly visible by default. The default Access Control List (ACL) settings allow anybody to connect to resources in your network. You can restrict access by configuring ACLs in the Allowed IPs section. + - **Private Networks** - Private Networks allow you to create virtual Private Networks for your Databases, enabling them to communicate in an isolated network without the need for a public IP address. If you select this option, you must select an existing Private Network to attach to your Read Replica. + + + Your private IP addresses are automatically allocated. They are managed via an IP Address Manager (IPAM). You can retrieve them on the Private Network tab of your Database Instance. To allocate IPs manually, you can use the Scaleway API and CLI, or Terraform/OpenTofu. + + + + If you select **Public network**, you can [attach a Private Network](/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replica/#how-to-manage-private-networks) to your Read Replica after its creation. If you choose to attach your Read Replica to a Private Network, you will not be able to add a Public Network to the same Read Replica later via the Scaleway console. You can, however, use the [Managed Databases API](https://www.scaleway.com/en/developers/api/managed-database-postgre-mysql/) to do so via a command line or Terraform/OpenTofu. + +8. Click **Create Read Replica**. A list of your Read Replicas displays. + + Read Replicas have the same node types as the main node. For example, if your main node is of the DB-GP-S type, so is your Read Replica. The Replica also inherits the main node's configuration. The data of your main node is fully replicated in the Read Replica. + + + + The time it takes to create the Read Replica depends on the volume of data being replicated. + + + diff --git a/macros/databases/autobackups.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/enable-autobackup.mdx similarity index 66% rename from macros/databases/autobackups.mdx rename to pages/managed-databases-for-postgresql-and-mysql/how-to/enable-autobackup.mdx index 13b7e28801..a27956a6ec 100644 --- a/macros/databases/autobackups.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/enable-autobackup.mdx @@ -1,17 +1,29 @@ --- -macro: autobackups +title: How to enable autobackup for Databases +description: Instructions for enabling Autobackup for PostgreSQL and MySQL databases. +tags: managed-dabatase autobackup database +dates: + validation: 2025-07-15 + posted: 2019-05-11 --- +import Requirements from '@macros/iam/requirements.mdx' With the autobackup feature, the creation and management of your Database Instance backups is automated according to your backup schedule configuration. Two types of autobackups are available at Scaleway: [backups](/managed-databases-for-postgresql-and-mysql/concepts/#database-backup) and [snapshots](/managed-databases-for-postgresql-and-mysql/concepts/#database-snapshot). -Backups are used when your Database Instance's storage option is a Local volume. Snapshots are available for Database Instances that use [Block Storage](/managed-databases-for-postgresql-and-mysql/concepts/#block-storage) volumes. +Backups are used when your Database Instance's storage option is a Local volume. Snapshots are available for Database Instances that use [Block Storage Legacy](/managed-databases-for-postgresql-and-mysql/concepts/#block-storage-legacy) and [Block Storage](/managed-databases-for-postgresql-and-mysql/concepts/#block-storage) volumes. Although they bear the same feature name, automated snapshots and automated backups are different in their design. If you have a Database Instance using Block Storage, it is only possible to use automated snapshots as autobackup. + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- A [PostgreSQL or MySQL Database Instance](/managed-databases-for-postgresql-and-mysql/quickstart/) + - The autobackup feature is enabled by default upon the creation of an Instance. Simultaneously, a schedule policy is created. The default autobackup frequency is of 1 per day with a retention period of 7 days. You can change this in the Database Instance information page after Instance creation. - By default, the Database Instance creation date is used as the base timestamp for the automated backups. When you change the schedule configuration, the moment you validated the new configuration becomes the new base timestamp. For example, if at 8 a.m. on a Thursday you update the autobackup frequency to 24h, your next autobackup will be created at 8 a.m. on a Friday. @@ -28,4 +40,8 @@ Backups are used when your Database Instance's storage option is a Local volume. Although autobackup is enabled by default, you can select **Manual** in the **Choose a backup configuration** step of the Database Instance creation wizard to disable the feature before you create the Instance. You can also disable it after the Database Instance is ready. -5. Configure the backup frequency and retention, then click to confirm. \ No newline at end of file +5. Configure the backup frequency and retention, then click to confirm. + +You can follow our documentation to [restore](/managed-databases-for-postgresql-and-mysql/how-to/manage-manual-backups/#how-to-restore-backups) and [export](/managed-databases-for-postgresql-and-mysql/how-to/manage-manual-backups/#how-to-export-backups) your backups. + +For snapshots, you can follow the [how to restore snapshots](/managed-databases-for-postgresql-and-mysql/how-to/manage-snapshots/#how-to-create-a-database-instance-from-a-snapshot) procedure to create a Database Instance from a snapshot. diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/enable-high-availability.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/enable-high-availability.mdx new file mode 100644 index 0000000000..6d748098c9 --- /dev/null +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/enable-high-availability.mdx @@ -0,0 +1,39 @@ +--- +title: How to enable High Availability +description: Learn how to switch a standalone node to high availability mode for your Database Instance. +tags: managed-database high-availability node-configuration database-instance +dates: + validation: 2025-04-02 + posted: 2025-04-02 +--- +import Requirements from '@macros/iam/requirements.mdx' + + +You define your Database Instance's node configuration upon its [creation](/managed-databases-for-postgresql-and-mysql/how-to/create-a-database). Two node configuration modes are available with PostgreSQL or MySQL Database Instances. + +- **High Availability**: creates a secondary Instance with an up-to-date replica of the database. If the primary Instance fails, the secondary takes over requests. +- **Standalone**: a standalone database provisioned on a single node. + +If you are standalone mode, you can change the node configuration to High Availability in the console anytime. + + + Once you upgrade to the High Availability mode, you cannot revert to standalone. + + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- A [PostgreSQL or MySQL Database Instance](/managed-databases-for-postgresql-and-mysql/how-to/create-a-database/) in standalone mode. + +1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. +2. Select the geographical region of the Instance you want to manage from the drop-down. +3. Click the name of the Database Instance you want to configure. Your database's **Overview** page displays. +4. Scroll down to the **Node settings** section. Then, click **Activate High Availability**. +5. Review the new estimated cost. +6. Click **Activate**. + + + The action of changing the node configuration will perform a rolling upgrade of your Database Instance. During this process, the Database Instance will be unavailable for several tens of seconds. + + diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-backups.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-manual-backups.mdx similarity index 87% rename from pages/managed-databases-for-postgresql-and-mysql/how-to/manage-backups.mdx rename to pages/managed-databases-for-postgresql-and-mysql/how-to/manage-manual-backups.mdx index 0c88394a90..6a4bf4262d 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-backups.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-manual-backups.mdx @@ -1,13 +1,17 @@ --- -title: How to manage backups for Database Instances -description: Step-by-step guide to managing backups for PostgreSQL and MySQL databases. +title: How to manage manual backups for Database Instances +description: Step-by-step guide to managing manual backups for PostgreSQL and MySQL databases. tags: managed-database database instance backup dates: - validation: 2025-08-07 - posted: 2025-08-07 + validation: 2025-07-15 + posted: 2021-03-10 --- import Requirements from '@macros/iam/requirements.mdx' -import Autobackups from '@macros/databases/autobackups.mdx' + + +Manual backups are useful in cases when you need to have a backup of a specific state of the Database Instance. They can be created for all Database Instances with Local Storage. + +You can create manual backups for Database Instances with Block Storage if the Database Instance storage is **inferior or equal to 585 GB**. @@ -17,10 +21,6 @@ import Autobackups from '@macros/databases/autobackups.mdx' ## How to create manual backups -Manual backups are useful in cases when you need to have a backup of a specific state of the Database Instance. They can be created for all Database Instances with Local Storage. - -You can create manual backups for Database Instances with Block Storage if the Database Instance storage is **inferior or equal to 585 GB**. - 1. Click the **Backups** tab on your selected Database Instance's information page. 2. Click **Create backup**. 3. Enter a **name** for the backup, choose the database and set an expiration date for the backup to be removed automatically. @@ -29,14 +29,10 @@ You can create manual backups for Database Instances with Block Storage if the D 4. Click **Create backup** to launch the backup process for the database. -## How to set up autobackups - - - ## How to restore backups 1. Click the **Backups** tab on your selected Database Instance's information page. -2. Click , then **Restore** next to the name of the backup you want to restore. A pop-up displays. +2. Click > **Restore** next to the name of the backup you want to restore. A pop-up displays. 4. Select the Database Instance and the database to which you wish to restore the backup. Two options are available: - Restoring to the original database. This will restore the backup to the same database. - Restoring to a new database. If you select this option, you must set a name for your new database. diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-nodes.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-nodes.mdx deleted file mode 100644 index 531db92a9e..0000000000 --- a/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-nodes.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: How to manage Database Instance nodes -description: Guide to managing Database Instance nodes. -tags: managed-database postgresql mysql upgrade -dates: - validation: 2025-08-07 - posted: 2025-08-07 ---- -import Requirements from '@macros/iam/requirements.mdx' - -You can change your Database Instance the node type and enable High Availability after the nodes have been created. - - - -- A Scaleway account logged into the [console](https://console.scaleway.com) -- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization -- A [PostgreSQL or MySQL Database Instance](/managed-databases-for-postgresql-and-mysql/quickstart/) - -## How to change the node type - - - If you have a Database Instance that uses a Local volume, and you want to upgrade to a node type that uses Block volumes, you must [change the volume type](/managed-databases-for-postgresql-and-mysql/how-to/change-volume-type/) to Block Storage first. - - -1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. -2. Select the geographical region of the Instance you want to manage from the drop-down. -3. Click the name of the Database Instance you want to configure. Your database's Overview page displays. -4. Scroll down to the **Node settings** section. Then, click **Change node type**. -5. Choose the specifications of the new Database Instance from the drop-down list. -6. Click **Update node type** to confirm your choices. - - Keep in mind that: - - Changing the node type performs a rolling upgrade of your Database Instance. - - During this process, the Database Instance will be unavailable for several seconds. - - The Instance stays in `Initializing` mode throughout the process. - - If you use local storage: - - Make sure that the Database Instance you choose provides sufficient disk space for your database. Otherwise, an error message will be displayed, and the database will not be upgraded. - - The process can take longer than expected, but the unavailability period of the Instance will be short. This means that though the Database Instance mostly remains available during the entire process, bar a few seconds. - - -## How to enable High Availability - -You define your Database Instance's node configuration upon its [creation](/managed-databases-for-postgresql-and-mysql/how-to/create-a-database). Two node configuration modes are available with PostgreSQL or MySQL Database Instances. - -- **High Availability**: creates a secondary Instance with an up-to-date replica of the database. If the primary Instance fails, the secondary takes over requests. -- **Standalone**: a standalone database provisioned on a single node. - -If you are in standalone mode, you can change the node configuration to High Availability in the console at any time. - - - Once you upgrade to the High Availability mode, you cannot revert to standalone. - - - - -- A Scaleway account logged into the [console](https://console.scaleway.com) -- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization -- A [PostgreSQL or MySQL Database Instance](/managed-databases-for-postgresql-and-mysql/how-to/create-a-database/) in standalone mode. - -1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. -2. Select the geographical region of the Instance you want to manage from the drop-down. -3. Click the name of the Database Instance you want to configure. Your database's **Overview** page displays. -4. Scroll down to the **Node settings** section. Then, click **Activate High Availability**. -5. Review the new estimated cost. -6. Click **Activate**. - - - Keep in mind that: - - Changing the node type performs a rolling upgrade of your Database Instance. - - During this process, the Database Instance will be unavailable for several seconds. - - The Instance stays in `Initializing` mode throughout the process and all console actions are unavailable. - - If you use local storage the process can take longer than expected, but the unavailability period of the Instance will be short. This means that though the Database Instance mostly remains available during the entire process, bar a few seconds. - \ No newline at end of file diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-permissions.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-permissions.mdx new file mode 100644 index 0000000000..1c8ce9a1ce --- /dev/null +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-permissions.mdx @@ -0,0 +1,48 @@ +--- +title: How to manage user permissions for Managed Database for PostgreSQL and MySQL +description: Instructions for managing user permissions in PostgreSQL and MySQL databases. +tags: managed-database postgresql mysql database-instance +dates: + validation: 2025-07-22 + posted: 2022-03-25 +--- +import Requirements from '@macros/iam/requirements.mdx' + + +Permissions define the actions a user can perform on a logical database. A database user is generated automatically when you create your Database Instance and this user is attributed all permissions. However, newly created users have no permissions by default. + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- A [PostgreSQL or MySQL Database Instance](/managed-databases-for-postgresql-and-mysql/quickstart/) + +## Set permissions for an existing user + +1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. +2. Select the geographical region of the Instance you want to manage from the drop-down. +3. Click the database name or > **More info** to access the Database Instance information page. +4. Go to the **Users** tab. A list of users displays. +5. Click > **Update permissions** to open the user permissions panel. +6. Select the appropriate permissions for each database. + + Three types of permissions are available: + - **None:** No access to the database + - **Read:** Allow users to read tables and fields in a database + - **Write:** Allow users to write content in databases + + +7. Click **Update user** to confirm. + +## Set permissions for a new user + +During user creation, the permissions panel can be accessed through the top tab menu. +For more information, see [how to add users](/managed-databases-for-postgresql-and-mysql/how-to/add-users/). + + + Permissions are applied on existing items **at the moment the configuration is set**, and not applied to any items created afterward. + When you modify your Database configuration, your configured permissions are automatically set to **Custom**. The **Custom** setting ensures that your permissions are still valid for items created before you reconfigured your Database. + Any items created after you change your configuration will not have permissions applied to them, you must set new permissions. + + + diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replicas.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replica.mdx similarity index 68% rename from pages/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replicas.mdx rename to pages/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replica.mdx index ad350c4ac0..0f914ee3ba 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replicas.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replica.mdx @@ -8,48 +8,13 @@ dates: --- import Requirements from '@macros/iam/requirements.mdx' -A Read Replica is a live copy of a Database Instance that behaves like an Instance, but that only allows read-only connections. The replica mirrors the data of the primary Database node and any changes made are replicated to the replica asynchronously. - -Read Replicas allow you to scale your Database Instance for read-heavy database workloads. They can also be used for business intelligence workloads. - A Scaleway account logged into the [console](https://console.scaleway.com) - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization - A [PostgreSQL or MySQL Database Instance](/managed-databases-for-postgresql-and-mysql/quickstart/) - -## Create a Read Replica - -1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. -2. Select the geographical region of the Instance you want to manage from the drop-down. -3. Click the database name or > **More info** to access the Database Instance information page. -4. Scroll down to the **Read Replica** section. -5. Click **Create Read Replica**. A pop-up displays. -6. Select the Availability Zone (AZ) configuration. Two configurations are available: - - - **Same AZ**: Your Read Replica is hosted in the same AZ as your main Database Instance. We recommend this option for low-latency workflows. - - **Multi-AZ**: Your Read Replica is hosted in a different AZ, ensuring the resilience of your Replica. We recommend this option for ensuring the availability of your infrastructure, and improving your disaster recovery plan. - -7. Select the network type. Two types are available: - - - **Public network** - Resources in a public network are publicly visible by default. The default Access Control List (ACL) settings allow anybody to connect to resources in your network. You can restrict access by configuring ACLs in the Allowed IPs section. - - **Private Networks** - Private Networks allow you to create virtual Private Networks for your Databases, enabling them to communicate in an isolated network without the need for a public IP address. If you select this option, you must select an existing Private Network to attach to your Read Replica. - - - Your private IP addresses are automatically allocated. They are managed via an IP Address Manager (IPAM). You can retrieve them on the Private Network tab of your Database Instance. To allocate IPs manually, you can use the Scaleway API and CLI, or Terraform/OpenTofu. - - - - If you select **Public network**, you can [attach a Private Network](/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replica/#how-to-manage-private-networks) to your Read Replica after its creation. If you choose to attach your Read Replica to a Private Network, you will not be able to add a Public Network to the same Read Replica later via the Scaleway console. You can, however, use the [Managed Databases API](https://www.scaleway.com/en/developers/api/managed-database-postgre-mysql/) to do so via a command line or Terraform/OpenTofu. - -8. Click **Create Read Replica**. A list of your Read Replicas displays. - - Read Replicas have the same node types as the main node. For example, if your main node is of the DB-GP-S type, so is your Read Replica. The Replica also inherits the main node's configuration. The data of your main node is fully replicated in the Read Replica. - - - - The time it takes to create the Read Replica depends on the volume of data being replicated. - +- [Created a Read Replica](/managed-databases-for-postgresql-and-mysql/how-to/create-read-replica/) ## How to resync a Read Replica diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-snapshots.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-snapshots.mdx index 7c0fc2c860..f79be0552e 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-snapshots.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/manage-snapshots.mdx @@ -1,23 +1,17 @@ --- -title: How to manage snapshots +title: How to manage Database snapshots description: Instructions for managing snapshots of PostgreSQL and MySQL databases. tags: managed-database database database-snapshot dates: - validation: 2025-08-07 + validation: 2025-07-15 posted: 2021-03-10 --- import Requirements from '@macros/iam/requirements.mdx' -import Autobackups from '@macros/databases/autobackups.mdx' -[Snapshots](/managed-databases-for-postgresql-and-mysql/how-to/manage-snapshots/) allow you to restore data in a new Database Instance, instead of creating individual automated database backups. It is only available for Database Instances that use Block Storage volumes. - -When you set up [autobackups](/managed-databases-for-postgresql-and-mysql/how-to/manage-backups/) for Database Instances that use Block Storage, the automatic backups are created in snapshot format. -You can create new Database Instances from a snapshot. +[Snapshots](/managed-databases-for-postgresql-and-mysql/how-to/manage-snapshots/) allow you to restore data in a new Database Instance, instead of creating individual automated database backups. It is only available for Database Instances that use Block Storage volumes. - - Refer to the [How to create a Database Instance from a snapshot](/managed-databases-for-postgresql-and-mysql/how-to/create-a-database#how-to-create-a-database-instance-from-a-snapshot) procedure for more information. - +When you set up [autobackups](/managed-databases-for-postgresql-and-mysql/how-to/enable-autobackup/) for Database Instances that use Block Storage, the automatic backups are created in snapshot format. You can have up to 100 snapshots per Instance and Project (depending on quotas). @@ -41,9 +35,21 @@ You can have up to 100 snapshots per Instance and Project (depending on quotas). 4. Click **Create snapshot** to confirm. -## How to set up autobackups +## How to create a Database Instance from a snapshot + +You can restore the data contained in a snapshot to a Database Instance. When you do so, a new Database Instance is created and billed to your account. + +1. Go to the **Snapshots** tab of your Database Instance of choice. +2. Click the next to the name of the snapshot. +3. Click **Create Database Instance from snapshot**. A pop-up appears. +4. Enter a name for your new Instance or leave the name suggested by Scaleway. +5. Choose a node type and configuration. + + It is possible to select a different (larger or smaller) node type for your new Instance. However, the Block volume size will be the same as the size of the restored snapshot. All Instance settings will be restored if you chose a node type with the same or more memory size than the initial Instance. Settings will be reset to the default if your node type has less memory. + +6. Click **Create Database Instance** to confirm. - + You can see the new Instance in your Database Instances list. ## How to delete snapshots diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/remove-public-endpoint.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/remove-public-endpoint.mdx index bc26e509b2..9bdf0fc791 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/how-to/remove-public-endpoint.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/remove-public-endpoint.mdx @@ -43,7 +43,7 @@ If you are using a public endpoint with your Database Instances or Read Replicas - A Scaleway account logged into the [console](https://console.scaleway.com) -- A [Read Replica](/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replicas/) +- A [Read Replica](/managed-databases-for-postgresql-and-mysql/how-to/create-read-replica/) 1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. 2. Select the geographical region of the Instance you want to manage from the drop-down. diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/upgrade-a-database.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/upgrade-a-database.mdx new file mode 100644 index 0000000000..d475cc7c20 --- /dev/null +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/upgrade-a-database.mdx @@ -0,0 +1,51 @@ +--- +title: How to upgrade a Managed Database for PostgreSQL and MySQL +description: Guide to upgrading your PostgreSQL or MySQL database on Scaleway. +tags: managed-database postgresql mysql upgrade +dates: + validation: 2025-07-22 + posted: 2019-05-11 +--- +import Requirements from '@macros/iam/requirements.mdx' + + +You can upgrade your Database Instances in two ways: by increasing its Block Storage volume or by changing the node type. + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- A [PostgreSQL or MySQL Database Instance](/managed-databases-for-postgresql-and-mysql/quickstart/) + +## How to increase a Block Storage volume + +1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. +2. Select the geographical region of the Instance you want to manage from the drop-down. +3. Click the name of the Database Instance you want to configure. The Database Instance overview page displays. +4. Scroll down to **Volume settings**. +5. Specify your volume capacity (in GB). The amount you define will be your new volume capacity. + + - You can increase your Block Storage volume to up to 10 TB. + - Block volume sizes cannot be decreased. + +6. Click **Increase volume size** to confirm. + +## How to change the node type + + + If you have a Database Instance that uses a Local volume, and you want to upgrade to a node type that uses Block volumes, you must [change the volume type](/managed-databases-for-postgresql-and-mysql/how-to/change-volume-type/) to Block Storage first.

+ + Similarly, if you have a new-generation Database Instance using a [Block Storage volume](/managed-databases-for-postgresql-and-mysql/concepts/#block-storage) node type and want to switch to a first-generation node type, you must first change the volume type to [Block Storage Legacy](/managed-databases-for-postgresql-and-mysql/concepts/#block-storage-legacy). +
+ +1. Click **PostgreSQL and MySQL** under **Databases** on the side menu. A list of your Database Instances displays. +2. Select the geographical region of the Instance you want to manage from the drop-down. +3. Click the name of the Database Instance you want to configure. Your database's Overview page displays. +4. Scroll down to the **Node settings** section. Then, click **Change node type**. +5. Choose the specifications of the new Database Instance from the drop-down list. +6. Click **Update node type** to confirm your choices. + + Make sure that the Database Instance you choose provides sufficient disk space for your database. Otherwise, an error message will be displayed, and the database will not be upgraded. + + +The action of changing the node type will perform a rolling upgrade of your Database Instance. During this process, the Database Instance will be unavailable for several tens of seconds. \ No newline at end of file diff --git a/pages/managed-databases-for-postgresql-and-mysql/how-to/upgrade-version.mdx b/pages/managed-databases-for-postgresql-and-mysql/how-to/upgrade-version.mdx index f8a6fb4990..40c3c15433 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/how-to/upgrade-version.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/how-to/upgrade-version.mdx @@ -67,7 +67,7 @@ We recommend you remove the identified instances before continuing. When you upgrade to a new version: - There is no synchronization between the source and target Database Instances. To avoid data loss, we recommend you stop any write operations running on your applications during the upgrade. If you let them run during the process, the data will be stored only in the source Database Instance. - - Your Database Instances in [High Availability (HA)](/managed-databases-for-postgresql-and-mysql/concepts/#high-availability) mode will migrate to a standalone Instance. To maintain your HA mode, you must manually [enable HA](/managed-databases-for-postgresql-and-mysql/how-to/manage-nodes/enable-high-availability) after the upgrade is complete. The same applies when upgrading [Read Replicas](/managed-databases-for-postgresql-and-mysql/how-to/manage-read-replicas). + - Your Database Instances in [High Availability (HA)](/managed-databases-for-postgresql-and-mysql/concepts/#high-availability) mode will migrate to a standalone Instance. To maintain your HA mode, you must manually [enable HA](/managed-databases-for-postgresql-and-mysql/how-to/enable-high-availability) after the upgrade is complete. The same applies when upgrading [Read Replicas](/managed-databases-for-postgresql-and-mysql/how-to/create-read-replica). - Database Instance [advanced settings](/managed-databases-for-postgresql-and-mysql/how-to/configure-advanced-settings) are synced as long as they are still available on the new database engine version. @@ -80,6 +80,6 @@ We recommend you remove the identified instances before continuing. - In PostgreSQL major upgrades, the `pgaudit` and `pg_stat_statements` [engine extensions](/managed-databases-for-postgresql-and-mysql/reference-content/postgresql-extensions) will be removed. You must reinstall these extensions on each database they are installed once the upgrade is complete. - - If you are upgrading to PG16, we recommend you [reset your user passwords](/managed-databases-for-postgresql-and-mysql/how-to/manage-users) from the console or using `psql`, [PostrgreSQL's CLI](https://www.postgresql.org/docs/current/app-psql.html#APP-PSQL-META-COMMAND-PASSWORD). PG16 uses the **SCRAM-SHA-256** format to store passwords. The previous versions' password format is no longer supported in PG16. You can re-save your passwords after the upgrade and they will be stored in the correct format automatically. + - If you are upgrading to PG16, we recommend you [reset your user passwords](/managed-databases-for-postgresql-and-mysql/how-to/add-users) from the console or using `psql`, [PostrgreSQL's CLI](https://www.postgresql.org/docs/current/app-psql.html#APP-PSQL-META-COMMAND-PASSWORD). PG16 uses the **SCRAM-SHA-256** format to store passwords. The previous versions' password format is no longer supported in PG16. You can re-save your passwords after the upgrade and they will be stored in the correct format automatically. diff --git a/pages/managed-databases-for-postgresql-and-mysql/quickstart.mdx b/pages/managed-databases-for-postgresql-and-mysql/quickstart.mdx index 2584cb0f68..841b3f8637 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/quickstart.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/quickstart.mdx @@ -45,7 +45,7 @@ Discover the Managed Database for PostgreSQL and MySQL interface in the Scaleway The local Storage option is only available with the first-generation node types. - - Select the snapshot configuration. You can either leave the default **Automatic** option to enable [autobackups](/managed-databases-for-postgresql-and-mysql/how-to/manage-backups/) or select [Manual snapshots](/managed-databases-for-postgresql-and-mysql/how-to/manage-snapshots/). + - Select the snapshot configuration. You can either leave the default **Automatic** option to enable [autobackups](/managed-databases-for-postgresql-and-mysql/how-to/enable-autobackup/) or select [Manual snapshots](/managed-databases-for-postgresql-and-mysql/how-to/manage-snapshots/). - Add a name and set a password for your user. Your username and password must adhere to specific criteria: diff --git a/pages/managed-databases-for-postgresql-and-mysql/reference-content/security-and-reliability.mdx b/pages/managed-databases-for-postgresql-and-mysql/reference-content/security-and-reliability.mdx index 5f8cc9cfe5..ce41e4ddd6 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/reference-content/security-and-reliability.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/reference-content/security-and-reliability.mdx @@ -33,7 +33,7 @@ Managed Databases for PostgreSQL and MySQL targets the following SLOs for their You can configure your snapshots and/or backup settings to automate actions. When you define execution time, frequency, and expiration, you automate the creation and deletion of snapshots and backups. Creation happens at the defined frequency and deletion happens when resources reach their expiration date. -Refer to the [How to enable Autobackup](/managed-databases-for-postgresql-and-mysql/how-to/manage-backups/) documentation page for more information. +Refer to the [How to enable Autobackup](/managed-databases-for-postgresql-and-mysql/how-to/enable-autobackup/) documentation page for more information. ### Data restoration @@ -45,7 +45,7 @@ Keep in mind that: - Snapshots are disk "pictures" which contain all ready-to-use data structures for PostgreSQL and MySQL. Restoring a snapshot should usually take a few minutes. - Backups are logical backups of a database and only "raw" data from tables. Restoring a backup requires recreating objects such as indexes. Depending on the number of indexes, total data size, and database size, the restore operations can take from a few minutes to several hours. -Refer to the [How to manage backups](/managed-databases-for-postgresql-and-mysql/how-to/manage-backups/#how-to-restore-backups) and the [How to manage snapshots](/managed-databases-for-postgresql-and-mysql/how-to/create-a-database/#how-to-create-a-database-instance-from-a-snapshot) documentation pages for more information. +Refer to the [How to manage backups](/managed-databases-for-postgresql-and-mysql/how-to/manage-manual-backups/#how-to-restore-backups) and the [How to manage snapshots](/managed-databases-for-postgresql-and-mysql/how-to/manage-snapshots/#how-to-create-a-database-instance-from-a-snapshot) documentation pages for more information. ### Failover @@ -200,7 +200,7 @@ You are responsible for giving access to the relevant users or applications and Moreover, these accesses are stored inside your Database Instance only and are independent of Scaleway IAM, which means you are responsible for ensuring they are properly backed up or removed when required. -Refer to the [How to manage user permissions](/managed-databases-for-postgresql-and-mysql/how-to/manage-users/#set-permissions-for-an-existing-user/) documentation page for more information. +Refer to the [How to manage user permissions](/managed-databases-for-postgresql-and-mysql/how-to/manage-permissions/) documentation page for more information. ## Security best practices diff --git a/pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-performance-issues.mdx b/pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-performance-issues.mdx index fa7a721523..75bea83145 100644 --- a/pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-performance-issues.mdx +++ b/pages/managed-databases-for-postgresql-and-mysql/troubleshooting/database-instance-performance-issues.mdx @@ -26,6 +26,6 @@ You can carry out the following actions: - Check if the usage is nominal. The Database Instance can be impacted by high data loads or unexpected high traffic from an app or website, for example. You can [upgrade your Instance](/managed-databases-for-postgresql-and-mysql/how-to/upgrade-a-database) if necessary. - Check if there are slow queries in the Database Instance log. Huge or sub-optimized queries can slow down the instance significantly, or even fill up all the memory and trigger OOM kills. -2. Try connecting to the Database Instance in a [Private Network](/managed-databases-for-postgresql-and-mysql/how-to/connect-database-instance/#how-to-connect-to-a-database-instance-through-a-private-network). Public endpoint traffic for Managed Databases for MySQL and PostgreSQL goes through a load balancer, which adds significant latency. Using a Private Network also ensures better security, which makes it the recommended way to connect to a Managed Database. +2. Try connecting to the Database Instance in a [Private Network](/managed-databases-for-postgresql-and-mysql/how-to/connect-database-private-network). Public endpoint traffic for Managed Databases for MySQL and PostgreSQL goes through a load balancer, which adds significant latency. Using a Private Network also ensures better security, which makes it the recommended way to connect to a Managed Database. 3. Upgrade your storage volume solution. New Block Storage volumes provide improved performance compared to the Block Storage Legacy, for example. \ No newline at end of file diff --git a/pages/vpc/how-to/attach-resources-to-pn.mdx b/pages/vpc/how-to/attach-resources-to-pn.mdx index 4563c41712..631ea022cf 100644 --- a/pages/vpc/how-to/attach-resources-to-pn.mdx +++ b/pages/vpc/how-to/attach-resources-to-pn.mdx @@ -67,21 +67,21 @@ The following resource types can be attached to a Private Network: 5. Use the toggle to select the type of resource you want to attach: - **Managed** resources are created and managed via Scaleway, e.g. Instances, Elastic Metal servers, Load Balancers, Managed Databases, Kubernetes Kapsules, Public Gateways, Apple silicon etc. - - **Custom** resources are created and managed by yourself, e.g. virtual machines you are hosting on a Proxmox cluster on an Elastic Metal server. + - **Custom** resources are created and managed by yourself, e.g. virtual machines you are hosting on a Proxmox cluster on an Elastic Metal server. 6. Click **+ Attach resource**. A pop-up displays. 7. Complete the required information about the resource to attach. This depends on whether you are attaching a managed or custom resource. - + - + - From the first drop-down, select the **type** of managed resource (Instance, Elastic Metal server etc.) to attach. - From the second drop-down, select the **specific resource** of this type to attach. Only resources within the same region as the Private Network will be displayed. - - Select whether to **auto-allocate an available IP** from the pool of addresses for the Private Network or **specify an IP** that you have already [reserved via IPAM](/ipam/how-to/reserve-ip/). + - Select whether to **auto-allocate an available IP** from the pool of addresses for the Private Network or **specify an IP** that you have already [reserved via IPAM](/ipam/how-to/reserve-ip/). Only Instances, Load Balancers, Public Gateways, and Elastic Metal servers are compatible with reserved IPs. Support for Managed Databases, Apple silicon and Serverless will be coming soon. In the meantime, you must auto-allocate IPs for these products. @@ -91,7 +91,7 @@ The following resource types can be attached to a Private Network: - + This method is intended for custom resources such as VMs hosted on Elastic Metal. Do **not** attempt to attach a managed resource, such as an Instance, via this method - use the **Managed resource** attachment instead. @@ -112,7 +112,7 @@ You can also attach a managed resource to a Private Network from the resource's - [Instance](/instances/how-to/use-private-networks/#how-to-attach-instances-to-an-existing-private-network) - [Elastic Metal server](/elastic-metal/how-to/use-private-networks/#from-the-elastic-metal-section-of-the-console) - [Apple silicon](/apple-silicon/how-to/use-private-networks/) -- [Managed Database for PostgreSQL and MySQL](/managed-databases-for-postgresql-and-mysql/how-to/connect-database-instance/#how-to-connect-to-a-database-instance-through-a-private-network/) +- [Managed Database for PostgreSQL and MySQL](/managed-databases-for-postgresql-and-mysql/how-to/connect-database-private-network/) - [Load Balancer](/load-balancer/how-to/use-with-private-network/) - [Public Gateway](/public-gateways/how-to/configure-a-public-gateway/#how-to-attach-a-public-gateway-to-a-private-network) - [Serverless Functions](/serverless-functions/how-to/use-private-networks/) @@ -178,7 +178,7 @@ For full information on Scaleway internal DNS and hostname formats, including tr 6. Use the toggle to select the type of resource you want to detach: - **Managed** resources are created and managed via Scaleway, e.g. Instances, Elastic Metal servers, Load Balancers, Managed Databases, Kubernetes Kapsules, Public Gateways, Apple silicon etc. - - **Custom** resources are created and managed by yourself, e.g. virtual machines you are hosting on a Proxmox cluster on an Elastic Metal server. + - **Custom** resources are created and managed by yourself, e.g. virtual machines you are hosting on a Proxmox cluster on an Elastic Metal server. 7. Click the icon next to the resource you want to detach. diff --git a/pages/vpc/reference-content/getting-most-private-networks.mdx b/pages/vpc/reference-content/getting-most-private-networks.mdx index b40ff96c99..379d6a3bf5 100644 --- a/pages/vpc/reference-content/getting-most-private-networks.mdx +++ b/pages/vpc/reference-content/getting-most-private-networks.mdx @@ -24,7 +24,7 @@ VPCs and Private Networks are both **regional** resources. When you create a Pri | Region | Availability Zones | |-------------------------|---------------------------| -| France - Paris | PAR1, PAR2, PAR3 | +| France - Paris | PAR1, PAR2, PAR3 | | Netherlands - Amsterdam | AMS1, AMS2, AMS3 | | Poland - Warsaw | WAW1, WAW2, WAW3 | @@ -82,7 +82,7 @@ We strongly recommend that you disable public connectivity on all of your Scalew ### Public Gateways -You can use Scaleway [Public Gateways](/public-gateways/) to provide resources on a Private Network with a secure point of access to and from the public internet. +You can use Scaleway [Public Gateways](/public-gateways/) to provide resources on a Private Network with a secure point of access to and from the public internet. - Set the Public Gateway to advertize a default route to the internet, allowing attached resources to send packets to the internet via the gateway, without needing their own public IP address. - Activate the [SSH bastion](/public-gateways/how-to/use-ssh-bastion/) so that you can establish SSH connections to resources on the Private Network via the gateway's bastion. @@ -90,7 +90,7 @@ You can use Scaleway [Public Gateways](/public-gateways/) to provide resources o ### Load Balancers -Another option is to attach a Scaleway [Load Balancer](/load-balancer/) to the Private Network. By giving the Load Balancer a public IP address, and configuring Instances on the Private Network as backend servers for the Load Balancer via their private IP addresses, the Load Balancer can securely and efficiently distribute traffic to the Instances. This solution is suitable when you have multiple Instances serving the same application, although you can also use multiple frontends/backends and [routes](/load-balancer/how-to/create-manage-routes/) to direct traffic to specific server pools. +Another option is to attach a Scaleway [Load Balancer](/load-balancer/) to the Private Network. By giving the Load Balancer a public IP address, and configuring Instances on the Private Network as backend servers for the Load Balancer via their private IP addresses, the Load Balancer can securely and efficiently distribute traffic to the Instances. This solution is suitable when you have multiple Instances serving the same application, although you can also use multiple frontends/backends and [routes](/load-balancer/how-to/create-manage-routes/) to direct traffic to specific server pools. You can also disable public connectivity on the Load Balancer itself. This may be relevant if the Load Balancer is configured to receive and distribute traffic from resources on a different Private Network within the same VPC, for example. @@ -105,12 +105,12 @@ Different types of Scaleway resources may have different requirements and possib * **Max attached PNs**: The maximum number of Private Networks that a resource can be attached to * **Mandatory PN**: Whether or not a Private Network must necessarily be attached to this resource * **Compatible with private IPv6**: Whether or not the resource is compatible with private IPv6 addressing. Compatible resources generally acquire both an IPv4 and an IPv6 address when attached to a Private Network. -* **Compatible with reserved IPs**: Whether or not you can use a [reserved IP](/ipam/how-to/reserve-ip/#how-to-attach-a-managed-resource-to-a-private-network-using-a-reserved-ip-address) to attach the resource to a Private Network +* **Compatible with reserved IPs**: Whether or not you can use a [reserved IP](/ipam/how-to/reserve-ip/#how-to-attach-a-managed-resource-to-a-private-network-using-a-reserved-ip-address) to attach the resource to a Private Network | | Instance | Elastic Metal | Apple silicon | Kubernetes | Managed Inference | |------------------------------|----------|---------------|---------------|------------|-------------------| | Max attached PNs | 8 | 8 | 8 | 1 | 1 | -| Mandatory PN | No | No | No | Yes | No | +| Mandatory PN | No | No | No | Yes | No | | Compatible with private IPv6 | Yes | Yes | Yes | Yes | No | | Compatible with reserved IPs | Yes | Yes | No |No | No | | Additional information | -- | [Paid-for
feature](https://www.scaleway.com/en/pricing/elastic-metal/#network) | [Paid-for
feature](https://www.scaleway.com/en/pricing/apple-silicon/) | PN cannot be changed
after cluster creation | Must have at least one of
private and/or public endpoint | @@ -124,6 +124,6 @@ Different types of Scaleway resources may have different requirements and possib | Compatible with private IPv6 | No | No | No | No | No | Compatible with reserved IPs | No | No | Yes | Yes | No | Additional information | Must have at least one of
private and/or public endpoint | Must have at least one of
private and/or public endpoint | -- | Private LBs must have a PN | Egress traffic only, from VPC-supported namespaces. | -| Documentation | [Go](/managed-databases-for-postgresql-and-mysql/how-to/connect-database-instance/#how-to-connect-to-a-database-instance-through-a-private-network/) | [Go](/managed-databases-for-redis/faq/#what-is-the-private-networks-feature-for-redistm-database-instances) | [Go](/public-gateways/how-to/configure-a-public-gateway/#how-to-attach-a-public-gateway-to-a-private-network) | [Go](/load-balancer/how-to/use-with-private-network/) | [Go](/serverless-functions/how-to/use-private-networks/) +| Documentation | [Go](/managed-databases-for-postgresql-and-mysql/how-to/connect-database-private-network/) | [Go](/managed-databases-for-redis/faq/#what-is-the-private-networks-feature-for-redistm-database-instances) | [Go](/public-gateways/how-to/configure-a-public-gateway/#how-to-attach-a-public-gateway-to-a-private-network) | [Go](/load-balancer/how-to/use-with-private-network/) | [Go](/serverless-functions/how-to/use-private-networks/) diff --git a/pages/vpc/reference-content/use-case-basic.mdx b/pages/vpc/reference-content/use-case-basic.mdx index 2e6439ff66..2055d08296 100644 --- a/pages/vpc/reference-content/use-case-basic.mdx +++ b/pages/vpc/reference-content/use-case-basic.mdx @@ -9,11 +9,11 @@ dates: import image from './assets/scaleway-vpc-infra-1.webp' -Scaleway **V**irtual **P**rivate **C**loud (VPC) and the accompanying range of network products, are important building blocks within the Scaleway ecosystem. By creating your Scaleway resources within a carefully thought out VPC-based infrastructure, you can maximize security, resilience and efficiency. +Scaleway **V**irtual **P**rivate **C**loud (VPC) and the accompanying range of network products, are important building blocks within the Scaleway ecosystem. By creating your Scaleway resources within a carefully thought out VPC-based infrastructure, you can maximize security, resilience and efficiency. Knowing how to create, combine and configure resources such as Private Networks with definable subnets, VPC routing with custom routes, IPAM to define and manage your IP addresses, and resources such as Load Balancers and Public Gateways to facilitate connectivity and traffic distribution, is invaluable in achieving control over your networking environment. -This is the first in a series of use cases designed to show you potentially interesting and useful infrastructures, illustrating how to use VPC and other network products to achieve a robust, secure and scalable cloud environment. +This is the first in a series of use cases designed to show you potentially interesting and useful infrastructures, illustrating how to use VPC and other network products to achieve a robust, secure and scalable cloud environment. [Terraform/OpenTofu templates](https://github.com/scaleway/terraform-examples/tree/main/demo-vpc-app) accompany each use case. @@ -35,7 +35,7 @@ Full [Terraform/OpenTofu templates](##terraformopentofu) are available for this ## Detail -User requests go via a domain name, whose DNS record points to the public flexible IP of a Scaleway Load Balancer. This Load Balancer is attached to a **Private Network** in a **VPC**. It distributes user traffic to multiple **CPU & GPU Instances** which are also attached to the Private Network, and do not have their own public/flexible IP addresses. These Instances are accessible only from within the VPC. The Instances can store data to and retrieve data from **Block Storage** and a **Managed Database** attached to the same Private Network and not exposed to the internet. +User requests go via a domain name, whose DNS record points to the public flexible IP of a Scaleway Load Balancer. This Load Balancer is attached to a **Private Network** in a **VPC**. It distributes user traffic to multiple **CPU & GPU Instances** which are also attached to the Private Network, and do not have their own public/flexible IP addresses. These Instances are accessible only from within the VPC. The Instances can store data to and retrieve data from **Block Storage** and a **Managed Database** attached to the same Private Network and not exposed to the internet. The **Public Gateway** attached to the Private Network has its own public flexible IP address, and administrators can use solutions such as SSH bastion to connect to Instances via the Public Gateway for maintenance and administrative tasks. The Public Gateway also provides secure access to the public internet should the Instances need to download package updates, for example. Finally, the Public Gateway also allows the Instances to access services outside the VPC, e.g. those hosted on other Scaleway resources which are not compatible with VPC, via their public endpoints. @@ -57,7 +57,7 @@ The Public Gateway, with its public IP address, allows controlled access between ### Cost control -Creating Scaleway resources without their own public IP addresses saves money, as these addresses are billed resources, while the creation, configuration and assignment of IP addresses from a Private Network is free of charge. +Creating Scaleway resources without their own public IP addresses saves money, as these addresses are billed resources, while the creation, configuration and assignment of IP addresses from a Private Network is free of charge. ## Applications @@ -75,7 +75,7 @@ Follow the steps below to create this infrastructure using the [Scaleway console 3. [Create a Public Gateway](/public-gateways/how-to/create-a-public-gateway/) (set it to advertise the [default route](/public-gateways/concepts/#default-route)) and [attach it to the Private Network](/public-gateways/how-to/configure-a-public-gateway/#how-to-attach-a-public-gateway-to-a-private-network). 4. [Set up SSH bastion](/public-gateways/how-to/use-ssh-bastion/) on the Public Gateway, to allow administrator access. 5. [Create a Managed Database](/managed-databases-for-postgresql-and-mysql/how-to/create-a-database/). -6. [Detach the Managed Database's public endpoint](/managed-databases-for-postgresql-and-mysql/how-to/remove-public-endpoint/) and [attach it to the Private Network](/managed-databases-for-postgresql-and-mysql/how-to/connect-database-instance/#how-to-connect-to-a-database-instance-through-a-private-network/) you created in step 2. +6. [Detach the Managed Database's public endpoint](/managed-databases-for-postgresql-and-mysql/how-to/remove-public-endpoint/) and [attach it to the Private Network](/managed-databases-for-postgresql-and-mysql/how-to/connect-database-private-network/) you created in step 2. 7. Create and configure external services as required, e.g. [Object Storage](/object-storage/quickstart/), [Transactional Email](/transactional-email/quickstart/) and [Secret Manager](/secret-manager/quickstart/). 8. [Create your Instances](/instances/how-to/create-an-instance/), using the configuration best-suited to your application. Do not assign public IPv4 or IPv6 addresses to the Instances. Add Block Storage volumes as required (or you can create and attach these [later](/block-storage/quickstart/).) @@ -89,7 +89,7 @@ Follow the steps below to create this infrastructure using the [Scaleway console ## Terraform/OpenTofu -Terraform/OpenTofu templates for this architecture are provided in full on our [Scaleway Terraform/OpenTofu Examples repo](https://github.com/scaleway/terraform-examples/tree/main/demo-vpc-app/). Terraform/OpenTofu allows you to create Infrastructure as Code (IaC) to build, configure and manage your infrastructure with configuration files, rather than with the Scaleway console. +Terraform/OpenTofu templates for this architecture are provided in full on our [Scaleway Terraform/OpenTofu Examples repo](https://github.com/scaleway/terraform-examples/tree/main/demo-vpc-app/). Terraform/OpenTofu allows you to create Infrastructure as Code (IaC) to build, configure and manage your infrastructure with configuration files, rather than with the Scaleway console. The templates include an example "Task Tracker" application to show how the infrastructure is used. The application is containerized using Docker, deployed on an Instance in the Private Network and leverages PostgreSQL for data storage. Full instructions are provided for creating the infrastructure with Terraform/OpenTofu and deploying the test application. diff --git a/tutorials/configure-netbox-managed-postgresql-database/index.mdx b/tutorials/configure-netbox-managed-postgresql-database/index.mdx index 2765155cd3..053671478f 100644 --- a/tutorials/configure-netbox-managed-postgresql-database/index.mdx +++ b/tutorials/configure-netbox-managed-postgresql-database/index.mdx @@ -34,7 +34,7 @@ NetBox requires a PostgreSQL database. Configure your [Database for PostgreSQL]( 1. Enter the Databases section of your [Scaleway console](https://console.scaleway.com/rdb/instances) by clicking on **Managed Databases** in the side menu. 2. [Create a Database Instance.](/managed-databases-for-postgresql-and-mysql/how-to/create-a-database/) 3. [Create a database](/managed-databases-for-postgresql-and-mysql/how-to/add-a-database/) called `netbox`. -4. [Create a new user](/managed-databases-for-postgresql-and-mysql/how-to/manage-users/) also called `netbox` and grant it ALL permissions to the `netbox` database. +4. [Create a new user](/managed-databases-for-postgresql-and-mysql/how-to/add-users/) also called `netbox` and grant it ALL permissions to the `netbox` database. ## Installing NetBox diff --git a/tutorials/deploy-umami-on-serverless-containers/index.mdx b/tutorials/deploy-umami-on-serverless-containers/index.mdx index b556a22b10..3d5d62abe3 100644 --- a/tutorials/deploy-umami-on-serverless-containers/index.mdx +++ b/tutorials/deploy-umami-on-serverless-containers/index.mdx @@ -37,7 +37,7 @@ Umami is a simple, easy-to-use, self-hosted web analytics solution. It provides ## Preparating the database -1. Create a [database user](/managed-databases-for-postgresql-and-mysql/how-to/manage-users/) and [grant permissions](/managed-databases-for-postgresql-and-mysql/how-to/manage-users/#set-permissions-for-an-existing-user/) to the PostgreSQL database you want to use for Umami. +1. Create a [database user](/managed-databases-for-postgresql-and-mysql/how-to/add-users/) and [grant permissions](/managed-databases-for-postgresql-and-mysql/how-to/manage-permissions/) to the PostgreSQL database you want to use for Umami. 2. Clone the Umami project locally and enter the project's directory: ``` git clone https://github.com/mikecao/umami.git diff --git a/tutorials/how-to-implement-rag-generativeapis/index.mdx b/tutorials/how-to-implement-rag-generativeapis/index.mdx index abde02c1ab..8eb7c4be72 100644 --- a/tutorials/how-to-implement-rag-generativeapis/index.mdx +++ b/tutorials/how-to-implement-rag-generativeapis/index.mdx @@ -105,10 +105,10 @@ Create an `embed.py` file and add the following code to it: # embed.py from dotenv import load_dotenv import os - + from langchain_openai import OpenAIEmbeddings from langchain_postgres import PGVector - + # Load environment variables from .env file load_dotenv() ``` @@ -143,7 +143,7 @@ Edit `embed.py` to configure connection to your Managed Database for PostgreSQL At this stage, you need to have data (e.g. PDF files) stored in your Scaleway Object storage bucket. As examples, you can download our [Instance CLI cheatsheet](https://www-uploads.scaleway.com/Instances_CLI_Cheatsheet_7ae4ed5564.pdf) and [Kubernetes cheatsheets](https://www.scaleway.com/en/docs/pdf/scaleway-kubernetes-cheatsheet.pdf) and store them into your [Object Storage bucket](https://console.scaleway.com/object-storage/buckets). -Below we will use LangChain's [`S3DirectoryLoader`](https://api.python.langchain.com/en/latest/document_loaders/langchain_community.document_loaders.s3_file.S3FileLoader.html) to load documents, and split them into chunks. +Below we will use LangChain's [`S3DirectoryLoader`](https://api.python.langchain.com/en/latest/document_loaders/langchain_community.document_loaders.s3_file.S3FileLoader.html) to load documents, and split them into chunks. Then, we will embed them as vectors and store these vectors in your PostgreSQL database. ### Import required modules @@ -199,10 +199,10 @@ Create a new file called `rag.py` and add the following content to it: ```python #rag.py - + import os from dotenv import load_dotenv - + from langchain_openai import OpenAIEmbeddings from langchain_postgres import PGVector from langchain import hub @@ -218,14 +218,14 @@ Edit `rag.py` to load `.env` file, and configure Embeddings format and Vector st ```python load_dotenv() - + embeddings = OpenAIEmbeddings( openai_api_key=os.getenv("SCW_SECRET_KEY"), openai_api_base=os.getenv("SCW_GENERATIVE_APIs_ENDPOINT"), model="bge-multilingual-gemma2", check_embedding_ctx_length=False ) - + connection_string = f'postgresql+psycopg2://{os.getenv("SCW_DB_USER")}:{os.getenv("SCW_DB_PASSWORD")}@{os.getenv("SCW_DB_HOST")}:{os.getenv("SCW_DB_PORT")}/{os.getenv("SCW_DB_NAME")}' vector_store = PGVector(connection=connection_string, embeddings=embeddings) ``` @@ -243,17 +243,17 @@ Edit `rag.py` to configure the LLM client using `ChatOpenAI` and create a simple api_key=os.getenv("SCW_SECRET_KEY"), model="llama-3.1-8b-instruct", ) - + prompt = hub.pull("rlm/rag-prompt") retriever = vector_store.as_retriever() - + rag_chain = ( {"context": retriever, "question": RunnablePassthrough()} | prompt | llm | StrOutputParser() ) - + for r in rag_chain.stream("Provide the CLI command to shut down a scaleway instance. Its instance-uuid is example-28f3-4e91-b2af-4c3502562d72"): print(r, end="", flush=True) ``` @@ -271,15 +271,15 @@ You can now execute your RAG pipeline with the following command: If you used the Scaleway cheatsheet provided as examples and asked for a CLI command to power of instance, you should see the following answer: ```sh - scw instance server stop example-28f3-4e91-b2af-4c3502562d72 + scw instance server stop example-28f3-4e91-b2af-4c3502562d72 ``` This command is correct and can be used with the Scaleway CLI. - You may also see a warning from Langchain: `LangSmithMissingAPIKeyWarning: API key must be provided when using hosted LangSmith API`. You can ignore this for the scope of this tutorial. This is due to Langchain requiring an API Key to activate the observability LangSmith module to store queries performed and optimize them afterwards. + You may also see a warning from Langchain: `LangSmithMissingAPIKeyWarning: API key must be provided when using hosted LangSmith API`. You can ignore this for the scope of this tutorial. This is due to Langchain requiring an API Key to activate the observability LangSmith module to store queries performed and optimize them afterwards. - + Note that vector embedding enabled the system to retrieve proper document chunks even if the Scaleway cheatsheet never mentions `shut down` but only `power off`. You can compare this result without RAG (for instance, by using the same prompt in [Generative APIs Playground](https://console.scaleway.com/generative-api/models/fr-par/playground?modelName=llama-3.1-8b-instruct)): @@ -297,10 +297,10 @@ Replace the `rag.py` content with the following: ```python #rag.py - + import os from dotenv import load_dotenv - + from langchain_openai import OpenAIEmbeddings from langchain_postgres import PGVector from langchain import hub @@ -309,31 +309,31 @@ Replace the `rag.py` content with the following: from langchain_openai import ChatOpenAI from langchain.chains.combine_documents import create_stuff_documents_chain from langchain_core.prompts import PromptTemplate - + load_dotenv() - + embeddings = OpenAIEmbeddings( openai_api_key=os.getenv("SCW_SECRET_KEY"), openai_api_base=os.getenv("SCW_GENERATIVE_APIs_ENDPOINT"), model="bge-multilingual-gemma2", check_embedding_ctx_length=False ) - + connection_string = f'postgresql+psycopg2://{os.getenv("SCW_DB_USER")}:{os.getenv("SCW_DB_PASSWORD")}@{os.getenv("SCW_DB_HOST")}:{os.getenv("SCW_DB_PORT")}/{os.getenv("SCW_DB_NAME")}' vector_store = PGVector(connection=connection_string, embeddings=embeddings) - + llm = ChatOpenAI( base_url=os.getenv("SCW_GENERATIVE_APIs_ENDPOINT"), api_key=os.getenv("SCW_SECRET_KEY"), model="llama-3.1-8b-instruct", ) - + prompt = """Use the following pieces of context to answer the question at the end. Provide only the answer in CLI commands, do not add anything else. {context} Question: {question} CLI Command Answer:""" custom_rag_prompt = PromptTemplate.from_template(prompt) retriever = vector_store.as_retriever() custom_rag_chain = create_stuff_documents_chain(llm, custom_rag_prompt) - - + + context = retriever.invoke("Provide the CLI command to shut down a scaleway instance. Its instance-uuid is example-28f3-4e91-b2af-4c3502562d72") for r in custom_rag_chain.stream({"question":"Provide the CLI command to shut down a scaleway instance. Its instance-uuid is example-28f3-4e91-b2af-4c3502562d72", "context": context}): print(r, end="", flush=True) @@ -356,7 +356,7 @@ Congratulations! You have built a custom RAG pipeline to improve LLM answers bas ## Going further - Specialize your RAG pipeline for your use case, such as providing better answers for customer support, finding relevant content through internal documentation, helping users generate more creative and personalized content, and much more. -- Store chat history to increase prompt relevancy. +- Store chat history to increase prompt relevancy. - Add a complete testing pipeline to test which prompt, models, and retrieval strategy provide a better experience for your users. You can, for instance, leverage [Serverless Jobs](https://www.scaleway.com/en/serverless-jobs/) to do so. ## Troubleshooting @@ -365,7 +365,7 @@ If you happen to encounter any issues, first ensure that you have: - The necessary [IAM permissions](/iam/reference-content/policy/), specifically **ContainersRegistryFullAccess**, **ContainersFullAccess** - An [IAM API key capable of interacting with Object Storage](/iam/api-cli/using-api-key-object-storage/) -- Stored the right credentials in your `.env` file allowing to connect to your [Managed Database Instance with admin rights](/managed-databases-for-postgresql-and-mysql/how-to/manage-users/) +- Stored the right credentials in your `.env` file allowing to connect to your [Managed Database Instance with admin rights](/managed-databases-for-postgresql-and-mysql/how-to/add-users/) Below are some known error messages and their corresponding solutions: