Backup and restore
This release introduces breaking changes for Operate and Tasklist, as well as Optimize.
You can use the backup feature of Camunda Platform 8 Self-Managed to regularly back up the state of all of its components (Zeebe, Operate, Tasklist, and Optimize) without any downtime. In case of failures that lead to data loss, you can recover the cluster from a backup.
A backup of Camunda Platform 8 consists of a backup of Zeebe, Operate, Tasklist, Optimize, and the backup of exported Zeebe records in Elasticsearch. Since the data of these applications are dependent on each other, it is important that the backup is consistent across all components. Therefore, you must take the backup of a Camunda Platform 8 cluster as a whole. The backups of individual components which are taken independently may not form a consistent recovery point. To ensure a consistent backup, follow the process described below.
Configure backup store
To take backups, you must first configure backup storage.
Operate, Tasklist, and Optimize use Elasticsearch as backend storage and use the snapshot feature of Elasticsearch for backing up their state. Therefore, you must configure a snapshot repository in Elasticsearch.
Zeebe stores its backup to an external storage and must be configured before the cluster is started. Refer to Zeebe backup configuration for additional information.
Backup process
The backup of each component and the backup of a Camunda Platform 8 cluster is identified by an id. This means a backup x of Camunda Platform 8 consists of backup x of Zeebe, backup x of Optimize, backup x of Operate, and backup x of Tasklist. The backup id must be an integer and greater than the previous backups.
We recommend using the timestamp as the backup id.
To back up a Camunda Platform 8 cluster, execute the following sequential steps:
- Trigger a backup
xof Optimize. See how to take an Optimize backup. - Trigger a backup
xof Operate. See how to take an Operate backup. - Trigger a backup
xof Tasklist. See how to take a Tasklist backup. - Wait until the backup
xof Optimize is complete. See how to monitor an Optimize backup. - Wait until the backup
xof Operate is complete. See how to monitor an Operate backup. - Wait until the backup
xof Tasklist is complete. See how to monitor a Tasklist backup. - Pause exporting in Zeebe. See Zeebe management API.
- Take a backup
xof the exported Zeebe records in Elasticsearch using the Elasticsearch Snapshots API.
PUT /_snapshot/my_repository/camunda_zeebe_records_backup_x
{
"indices": "zeebe-record*",
"feature_states": ["none"]
}
By default, the indices are prefixed with zeebe-record. If you have configured a different prefix when configuring Elasticsearch exporter in Zeebe, use this instead.
- Take a backup
xof Zeebe. See how to take a Zeebe backup. Wait until the backupxof the exported Zeebe records is complete and wait until the backupxof Zeebe is completed before proceeding. See how to monitor a Zeebe backup. - Resume exporting in Zeebe. See Zeebe management API.
If any of the steps above fail, you may have to restart with a new backup id. Ensure exporting is resumed if the backup process is aborted in the middle of the process.
Restore
To restore a Camunda Platform 8 cluster from a backup, all components must be restored from their backup corresponding to the same backup id: