Skip to content

Backup, Migrations and Restoring

Requirements

System Apps

As this is a SCALE-specific guide, we expect users to have fully followed the SCALE quick-start guide and hence have installed all operators from the system train as listed there. This includes VolSync, which depends on Prometheus-Operator, so ensure you have installed Prometheus-Operator prior to installing VolSync.

S3 Provider Setup

Backup Configuration

Enter your S3 credentials under the credentials section in each app you want to enable backup/restore functionality on.

S3 Credentials

PVC Backups

PVC data can be easily backed up to S3 storage by using our integrated VolSync support. For each individual app, the VolSync Destination (Restore) option must set on creation of the app by doing the following:

  1. Add VolSync to each persistence object you want synced as below

S3 Scale VolSync

  1. Add the name you gave to the S3 credentials earlier, under the credentials section of VolumeSnapshots

  2. Enable the VolSync Source (backup) and/or VolSync Destination Restore) options as desired

  3. Confirm the data is being sent to your S3 host after ~5 minutes

CNPG Database Backups

CNPG-backed PostgreSQL databases have their own S3 backup system. We have integrated it in such a way that they can safely share a bucket with the above PVC backups.

For each app:

  1. Add CNPG backups to each database you want backed up like shown below

  2. Add the name you gave to the S3 credentials earlier, under the credentials section

  3. Confirm the data is being sent to your S3 host after ~5 minutes

  4. We advise you to set the “mode” to restore, this should prevent the app starting with an empty database upon restore.

S3 Scale CNPG

Exporting App Configuration

To be done. This section will contain information to export your App configuration so it can be imported later.

Restoration Configuration

Recreating an App

When you’ve no exported app configuration, you can remake the app while also restoring your PVC and CNPG backups using the steps as follows:

  1. Ensure the app name matches the name of the app previously backed up

  2. Enter the same S3 credentials from earlier, under the credentials section

  3. Preferably ensure all other configuration options are set precisely the same as the last time you used the app, to ensure compatibility

PVC data Restoration

PVC data restoration will happen automatically before the app starts. Please be aware this can take a while depending on the size of the backup, your connection speed, etc.

CNPG Database Restore

Before CNPG will correctly restore the database, the following modifications need to be done after recreating or importing the app configuration:

  1. Ensure you’ve setup CNPG backups as well as restore as it was previously

  2. Ensure the “mode” is set to recovery

  3. Set “revision” on your restore to match the previous revision setting on your backup settings

  4. Increase the revision on your backup setting by 1 (or set to 1 if previously empty)

Importing App Configuration

To be done. This section will contain information to import your App configuration so you do not have to manually recreate it.

Total System Restore and Migration to New System

When on a completely new system, you can easily restore using the above steps with the following caveats:

  • On a non-SCALE system, the PVC backend needs to support snapshots
  • The apps need to be called exactly the same as they were before, preferably using a previously-exported config
  • If you’ve any non-PVC storage attached, be sure that this is still available or apps won’t start until this is resolved

Video Guide

TBD