The restore duration depends on the size of your database. Restore operations are considered as regular database activity, and are therefore billed the same way. Refer to our dedicated FAQ for more information.
How to manage backups for Serverless SQL Databases
Serverless SQL Databases are automatically backed up every day at the same time. Backups are stored for 7 days. They are useful when you need to restore a specific state of your Serverless SQL Database. You can restore a database to a previous state, create a new database from a specific backup, or export a backup in .pg_dump
format.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- Created a database
How to restore a Serverless SQL Database from a backup
-
Click SQL Databases in the Serverless section of the side menu. The Serverless SQL Databases page displays.
-
Click the name of the database you want to restore, then click the Backups tab. The list of backups displays.
-
Click the «See more Icon» icon next to the backup you want to restore, then select Restore database from the drop-down menu. A pop-up displays.
-
Type RESTORE, then click Restore database. The restoration process begins.
How to create a Serverless SQL Database from a backup
-
Click SQL Databases in the Serverless section of the side menu. The Serverless SQL Databases page displays.
-
Click the name of the database you want to restore, then click the Backups tab. The list of backups displays.
-
Click the «See more Icon» icon next to the backup you want to restore, then select Create database from backup from the drop-down menu. The database creation menu displays.
-
Complete the following steps in the wizard:
- Review the Backup parameters you will use to create a new database.
- Choose a region, which is the geographical location in which your database will be created.
- Select a default engine version from the drop-down menu.
- Configure your database autoscaling. Your database will scale within the defined range to match the incoming load.
Note
Define a minimum of 1 vCPU or more to avoid cold starts that can take a few seconds.
- Enter a name for your database, or keep the randomly generated name. The name must only contain alphanumeric characters and dashes.
- Verify the estimated cost.
-
Click Create database to finish. The setting up of your database will take a few seconds. Check the Overview tab to see its status.
How to export a Serverless SQL Database backup
-
Click SQL Databases in the Serverless section of the side menu. The Serverless SQL Databases page displays.
-
Click the name of the database you want to export, then click the Backups tab. The list of backups displays.
-
Click the «See more Icon» icon next to the backup you want to restore, then select Prepare export from the drop-down menu.
-
Click the Download button once your export is prepared to download your database backup in a
.pg_dump
format.
You can restore the downloaded backup using the pg_restore utility.