How to Set Up Managed Databases with Block Storage Volumes

Managed Databases with Block Storage - Overview

Scaleway Block Storage provides network-connected storage that can be attached or detached from instances like virtual hard drives.

When creating and setting up your Managed Database instances for MySQL and PostgreSQL engines, you can use Block Storage volumes as storage space. This option provides more flexibility for your database storage.

Since the volume is independent of the database node, you can define its size independently from the node type.

Note: The following limitations apply to Scaleway Database with Block Storage during the beta phase

  • Managed Databases with Block Storage are only available in the AMS and WAW regions.
  • Snapshots are not replicated off-site, but you can still create backups, which are replicated off-site.
  • Performance of instances with block storage is not representative of the final product.
  • Database Backups are possible when storage size is less than 585GB. Snapshots are limited to 10TB.

In this documentation, you will learn how to:

Create an instance with a Block Storage volume

1 . Click Database in the Storage section of the side menu of the Scaleway console.

2 . Click Create a Database Instance to launch the creation wizard.

You are asked to choose:

3 . A Database Engine. You can select between PostgreSQL and MySQL.

4 . A region. Currently, Block Storage is only available in the AMS and WAW regions.

5 . Your instance configuration. High Availability allows you to replicate your database on a second instance, and Standalone creates a standalone database provisioned on a single node, with no replication.

6 . Your storage type and the capacity.

In this documentation we select:

  • Block SSD Storage - With this type, your storage is decoupled from your compute resources. You can increase your storage space without changing your node type, with no downtime. You can define your storage capacity by entering the desired amount in the box. You can increase your volume to up to 10 TB.

7 . If necessary, enable automatic backups.

8 . Add a name and set a password for your user.

9 . Enter a name for your instance.

10 . Click Create a new Database Instance to confirm and launch the creation.

Once you have finished setting up your database instance configuration, click Create an Instance to confirm.

Increase the Block Storage volume

If you have an instance with a Block Storage volume, you can increase your volume to up to 10 TB.

Important: Block volume sizes cannot be decreased.

1 . On the Overview page of your selected Database Instance, scroll down to Volume settings.

2 . Click Increase Volume Size.

A pop up appears.

3 . Specify your volume capacity (in GB). The amount you define will be your new volume capacity.

Note: The block volume capacity can only be increased in chunks of 5GB.

Change the volume type

If you have Managed Database instances with local storage, it is possible to change your volume type to Block Storage.

Note: This feature is currently only available for instances located in the AMS and WAW regions.

Important: Before changing the volume type, make sure your instance is in in READY or DISK_FULL state.

1 . On your database instance overview page, click Change Volume type under Volume settings.

A pop up appears.

2 . Select Block Storage and click Validate to confirm.

Alternatively, you can change the volume type from Block Storage to local storage by following the same steps.

Note: Make sure your current node type has a local storage size greater than or equal to your current block storage size. If this is not the case, you must upgrade your current node type to one with enough local storage before you change the volume type.

How to Back up your nodes

Backups are logical data dumps of an individual database. They are useful when you need to restore a specific logical database. Scaleway’s Managed Database service makes backups for you, which you can use to restore your database.

When it comes to backing up your Managed Database with Block Storage, you can do it in three ways:

  • Autobackup - For database instances that use Block Storage volumes, Scaleway Database uses the Snaphots feature to create Autobackups. To set up automatic backups, follow the step by step on this page.
  • Manual Backups - To manually create a backup, follow the procedure explained on this page
  • Manual Snapshots - The Snapshots feature is uniquely available to database instances that use Block Storage volumes. In the next section, we explain how to create snapshots.

How to create snapshots

Snapshots is a feature with which you can back up an entire 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 for instances that use Block Storage, the automatic backups are created in Snapshot format.

You can have up to 100 Snapshots per instance and per project (depending on quotas).

To manually create a snapshot:

1 . Go to the Snapshots tab of your database instance of choice.

Important: Make sure your instance is in READY state before creating a snapshot.

2 . Click + Create Snapshot.

A pop up appears.

3 . Enter a name for your snapshot and set up the expiration date and time.

Note: The default retention period for Snapshots is 365 days.

4 . Click Create Snapshot to confirm.

How to delete snapshots

When you delete an instance, its associated snapshots are not deleted. Snapshots can be manually deleted or will be deleted after the retention period defined.

If you do not wish to wait for the snapshot to expire, you can delete it manually.

1 . Go to the Snapshots tab of your database instance of choice.

2 . Click the menu next to the snapshot name.

3 . Then, click Delete.

A pop up appears to warn you that:

This will permanently destroy your Snapshot and all your data will be lost. This action is irreversible.

4 . Click Delete this snapshot if you wish to continue.

How to restore snapshots

When you restore a Snapshot, a new instance is created and billed to your account.

1 . Go to the Snapshots tab of your database instance of choice.

2 . Click the menu next to the snapshot name.

3 . Click Create Instance from Snapshot.

A pop up appears.

4 . You are asked to:

  • Enter a name for your new instance (1)
  • Select a node type (2)
  • Choose a configuration (3)

Note: It is possible to select a larger 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.

5 . Click Create Instance to confirm.

You can see the new instance in your database instances list.

Discover the Cloud That Makes Sense