-
Task
-
Resolution: Fixed
-
L3 - Default
-
None
-
Not defined
Context:
We need an endpoint to list all existing optimize backups, this can be useful for users who want to eg find out what the latest complete backup is. We also want to align the existing get backup state APIs across components with Zeebe.
The following changes to the existing get backup state API have been agreed on:
GET actuator/backups/{backupId}
- backupID is optional
- if backupID is specified, state API returns info on singular backup (no list)
- if no backupID is specified, state API returns list of info for first 1000 existing backups
- list is sorted descendingly by backupID
Example Response:
{[ { "backupID": "123", "state": COMPLETED // same states as existing state API, "failureReason": "The following snapshots failed: snapshotName1, snapshotName2,.." // taken from ES response, "details": [{ "snapshotName": "aName", "state": "SUCCESS" // taken from ES, "startTime": "2022-11-07T11:55:45.081+0100", "failures": [] // failures taken from ES response },...] }, ... ]}
Response codes:
- 200 OK
- 404 BackupID does not exist (only if specific backupID requested, if no backupID specified and no backup exists, returns empty list)
- 500 any other error, with details in error message
See meeting notes:
https://docs.google.com/document/d/1K1YLFi502FauH2gvZD2fzkPIKKnK1w9fT9SZJL4oSn0/edit#heading=h.ffszlz856vbu
https://docs.google.com/document/d/1BjQXdS7j2KYjVSVmm8YHEhMa4rcHlsR6r0fcHgzXY3Y/edit#
https://docs.google.com/document/d/1pITW-pvUiGuJ8kIeR1vqjnoqmhs0unnNN955jUkhF6w/edit?usp=sharing
AT:
- Get backup state API is adjusted to match the above
- API docs are adjusted on confluence (user docs to follow in separate ticket)
- will probably need to introduce new limitation that backupId must not contain _
Testing Notes:
- Setup see confluence docs https://confluence.camunda.com/display/CO/Backup
- test with and without backupID, ie GET actuator/backups/{backupId} and GET actuator/backups/
- test with and without existing backups
- test it only returns the snapshots created by Optimize by also adding a manually created snapshot with a similar name, eg camunda_optimize_test_part_3_of_3
- Note: this also introduces the new limitation that users cannot create backups with _ in the backupId so we should test that too