Skip to content

Restore Scaleway

This page serves as a global guideline on how to restore resources on Scaleway.

Restore one or multiple instances

All instances are provisioned with Ansible, so restoring instances involves little more than destroying and recreating them. You can follow these steps:

  • Manually delete the instances in the Scaleway console, or set instance_count = 0 and apply Terraform.
  • Run Terraform to create the new instances.
  • Run the glh.environment_toolkit.all Ansible playbook to provision all instances.

There are a few caveats for some instance types, these are listed below.

Gitaly

Gitaly data is stored on disk and not in S3. This means that a GitLab backup needs to be restored whenever Gitaly instances are recreated. Follow the steps described in the GitLab restoration docs.

Restore an RDS database

Scaleway documentation: How to create a Database Instance from a snapshot

  • Go to Databases > PostgreSQL & MySQL > Snapshots.
  • Click on "..." > "Create Database instance from snapshot" for the snapshot you want to restore.
  • Here you need to specify:
  • The name, choose <existing-name>-restored.
  • Select the same node type as the existing database.
  • Select High Availability if the existing database has this as well.
  • Click "Create Database Instance".
  • Rename the old database to <existing-name>-broken.

To ensure Terraform will manage the restored database remove the old one from the state and add the new instance:

terraform state rm module.gitlab_cluster.scaleway_rdb_instance.gitlab
terraform import module.gitlab_cluster.scaleway_rdb_instance.gitlab <RDS-ID>
terraform apply