NavigationContentFooter
Jump toSuggest an edit

How to manage backups for Serverless SQL Databases

Reviewed on 02 July 2024Published on 05 December 2023

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.

Important

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.

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

  1. Click SQL Databases in the Serverless section of the side menu. The Serverless SQL Databases page displays.

  2. Click the name of the database you want to restore, then click the Backups tab. The list of backups displays.

  3. 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.

  4. Type RESTORE, then click Restore database. The restoration process begins.

How to create a Serverless SQL Database from a backup

  1. Click SQL Databases in the Serverless section of the side menu. The Serverless SQL Databases page displays.

  2. Click the name of the database you want to restore, then click the Backups tab. The list of backups displays.

  3. 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.

  4. 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.
  5. 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

  1. Click SQL Databases in the Serverless section of the side menu. The Serverless SQL Databases page displays.

  2. Click the name of the database you want to export, then click the Backups tab. The list of backups displays.

  3. Click the «See more Icon» icon next to the backup you want to restore, then select Prepare export from the drop-down menu.

  4. Click the Download button once your export is prepared to download your database backup in a .pg_dump format.

Tip

You can restore the downloaded backup using the pg_restore utility.

See also
How to edit a Serverless SQL Database's autoscalingHow to delete a Serverless SQL Database
Docs APIScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCarreer
© 2023-2024 – Scaleway