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
Examples
- Triggering savepoints endpoints
- This
command
returns$ curl -X POST -k -u ${MANAGEMENT_USERNAME}:${MANAGEMENT_PASSWORD} ${MANAGEMENT_URL}/api/v1/processing/jobs/savepoints
[{"name":"dba/bai-bpmn","request-id":"49bfd59e16a1b521c4ff63bf152d4fd0","jid":"554ad87ad1b8eff85f910e791ff6952d","state":"COMPLETED","location":"file:/mnt/pv/savepoints/dba/bai-bpmn/savepoint-554ad8-2f214ebb11e2"}]
- Triggering checkpoint endpoints
- This
command
returns$ curl -X GET -k -u ${MANAGEMENT_USERNAME}:${MANAGEMENT_PASSWORD} ${MANAGEMENT_URL}/api/v1/processing/jobs/554ad87ad1b8eff85f910e791ff6952d/checkpoint
{"jid":"554ad87ad1b8eff85f910e791ff6952d","completed_trigger_timestamp":1638718929999,"completed_location":"/mnt/pv/checkpoints/dba/bai-bpmn/554ad87ad1b8eff85f910e791ff6952d/chk-7571","savepoint_trigger_timestamp":1638718895315,"savepoint_location":"/mnt/pv/savepoints/dba/bai-bpmn/savepoint-554ad8-5072f25f0d3b","restored_location":"/mnt/pv/savepoints/dba/bai-bpmn/savepoint-6156e2-34ef68a03c2d"}