DDLS-23 create weekly integration restore job #1588
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Run our restore on integration on a weekly basis to ensure it's fit for purpose in case of disaster.
Fixes DDLS-23
Approach
Checking for a point in time recovery and then a restore from a cross account snapshot.
The whole process is very very slow as that's how aws backups and restores work. The alternative is to pgdump and restore the data but we don't do that for real restores as this doesn't encrypt our data at rest in the backup account and doesn't allow for point in time recovery in the main account.
So anyway the approach here was to create some new roles in org infra and allow our preprod oidc role to assume them. We then run both restores back to back.
Learning
Everything about this takes ages to test so there's a lot of waiting for things to complete.. As such I have managed to test a full run of the cross acct backup to integration from the github pipeline and pit recovery from local but haven't run them both back to back in the pipeline. It ought to work though and we can fix forward if not.
Checklist
Frontend