Restarting from a checkpoint or savepoint
You can restart event processing from a specific checkpoint or savepoint, typically after an upgrade or an unrecoverable error.
Before you begin
About this task
Restarting from a checkpoint or savepoint gives you the opportunity to fix an unrecoverable error and start over from a valid savepoint or checkpoint.
- Savepoints for upgrading
- You create savepoints as part of the upgrade procedure. See Upgrading
Business Automation Insights.Important:
- Starting from savepoints is mandatory when you upgrade Business Automation Insights and the new version is based on a new Apache Flink version.
- If you restart from a checkpoint, do not change the parallelism of the Flink job. You can change the parallelism of the Flink job only in the context of restarting from a savepoint.
- Savepoints for recovery at any time
- You can also create savepoints at any time by running the HTTP POST request command as described next. If a job failure is preventing you from creating a savepoint, that is, if the savepoints endpoint returns an error, use the latest successful checkpoint.
Procedure
Example
- Triggering savepoints endpoints
- This
command
returnscurl -X POST -k -u admin:passw0rd "https://<your_bai_management_url_route>/api/v1/processing/jobs/savepoints"
[{"jid":"2228d8c5e592ee93b8e3b1e33d762a6b","name":"dba/bai-bpmn","request-id":"b169f74f50a085c7b0fc600efc136b28","state":"IN_PROGRESS"}]
- Triggering checkpoint endpoints
- This
command
returnscurl -X GET -k -u admin:passw0rd "https://<your_bai_management_url_route>/api/v1/processing/jobs/2228d8c5e592ee93b8e3b1e33d762a6b/checkpoint"
{"jid":"2228d8c5e592ee93b8e3b1e33d762a6b","completed_trigger_timestamp":1612517197656,"completed_location":"/mnt/pv/checkpoints/dba/bai-bpmn/2228d8c5e592ee93b8e3b1e33d762a6b/chk-76","savepoint_trigger_timestamp":1612517096739,"savepoint_location":"/mnt/pv/savepoints/savepoint-2228d8-cb0d3350a473","restored_location":null}