Skip to main content

Backups

What are Backups?

A Backup is a snapshot of the persistent data of a Stage. A Stage only has a persistent data if it has Components with at least one persistent storage. Thus, a backup allows you to take a point-in-time snapshot of all persistent storages across all Components, may it be files, a database storage or any other data.

The Build and Configuration are not included in the Backup. It contains data only.

Create and restore backups

Example for Web UI

Create a Backup

Navigate to your Project on the start page or under the 'Projects' navigation and click on the Stage you want to create a Backup for.

Scroll down to the bottom of the Stage overview page to see the Backup overview. Note, that you cannot only create new Backups here, but also see existing backups. If you click on the little arrow on the right you can expand a Backup to view more details:

backups dialog

To create a Backup, click 'NEW BACKUP' on the right side. A dialog appears that asks you for an individual name to identify the new Backup:

backup create

info

Pergola snapshots your data in the exact state it is at the time of the Backup creation. To be sure it is not in an inconsistent state at this point in time, e.g. during some writes to a data store, the Stage should be suspended before creating the Backup.

The backup takes some time to process before it is available for restore. While the Backup is still processing, the Stage can be used (i.e. resumed) without interfering with the Backup process.

backup details

Restore a Backup

Navigate to your Project on the start page or under the 'Projects' navigation and click on the Stage you want to restore a Backup for.

Ensure the Stage is suspended, then scroll down to the bottom of the Stage overview page to see the Backup overview and click on the 'Restore backup' button:

restore button

In the following dialog, you should review the contents of the Backup before clicking 'Restore Backup'. Consider that the Backup might have been created at a time when a different Build was released. The Backup restore will not change the Build released to the Stage currently. If necessary, you can switch to a different Build by issuing a new Release before restoring the Backup. You can keep the Stage suspended as long.

backup restore

After restore, you can resume the Stage immediately. Pergola makes sure that all data is restored before the Stage and its Components are fully back in service.

Example for CLI

Create a Backup

pergola create backup -s stage-to-backup -p my-project --display-name 'my 1st backup'

The Backup is created and processed in the background. While the Backup is still processing, the Stage can be used without interfering with the Backup process.

tip

You can retrieve all Backups for a specific Stage, including the Backup just created, via:

$ pergola list backup -s stage-to-backup -p my-project
┌───────────────────────────────────────────────────────────────────────────────────┐
| backup | name | created at | status |
| ───────────────────────────────────────────────────────────────────────────────── |
| 27349f98-b8e3-4f54-959c-3e1ae2d97a35 | my 1st backup | 7 minutes ago | ready |
| 6b48935c-e9b6-45e9-9393-28b5c82a4148 | my 2nd backup | 2 minutes ago | not ready |
└───────────────────────────────────────────────────────────────────────────────────┘

For further options see CLI reference.

Restore a Backup

To restore a Backup you need to look up its backup ID ( e.g. 27349f98-b8e3-4f54-959c-3e1ae2d97a35 ). This is best done via pergola list backups, see above.

We use the ID in the following command to restore the Backup:

pergola restore backup 27349f98-b8e3-4f54-959c-3e1ae2d97a35 -s stage-to-backup -p my-project
info

The Stage needs to be suspended before restoring a Backup. It can be resumed immediately after the restore.

See pergola suspend stage and resume stage.