crate-operator
crate-operator copied to clipboard
Remove grand-central tables before restoring a full snapshot
Summary of changes
If the type of restore is all or tables with gc tables in the list, check if the snapshot contains grand central tables and temporary rename them before executing the RESTORE query.
When the snapshot is restored, either drop the old gc tables or rename them back if it failed.
Checklist
- [x] Link to issue this PR refers to: https://github.com/crate/cloud/issues/2241
- [x] Relevant changes are reflected in
CHANGES.rst - [x] Added or changed code is covered by tests
- [ ] Documentation has been updated if necessary
- [x] Changed code does not contain any breaking changes (or this is a major version change)
@plaharanne I am wondering if Grand Central is being turned off during this process. I hope so because I think it is necessary, otherwise it may crash or recreate the tables. I searched a bit but didn't find anywhere whether GC is shutdown during backup restoration