-
Task
-
Resolution: Done
-
Blocker
-
None
-
None
-
5
-
False
-
None
-
False
-
Yes
-
-
-
RHOAM Sprint 38, RHOAM Sprint 39, RHOAM Sprint 40
WHAT
In the CRO AWS implementation, snapshotting of Postgres instances is supported, so that they can be restored from a backup. We need a method to do the same for GCP.
GCP Postgres supports on-demand backups, however these are tied to a particular Postgres instance. If the Postgres instance is removed for any reason (for example RHOAM being unintentionally uninstalled) the Postgres instance and associated backups will be destroyed.
If we want a solution for disaster recovery we need to use the export functionality on the instances to store a SQL/CSV backup of the DB to a GCP bucket. This process could be encapsulated by the original snapshot CR type. However if the lifecycle of the snapshot is controlled by the CR, then the removal of RHOAM will delete the associated namespaces (and CR's) resulting in the snapshots also being removed. One potential solution is to use a flag to indicate and retain the latest backup:
- RHOAM configures interval and number of snapshots in the Postgres CR
- Every time we reach a new snapshot interval the following must take place:
- Any expired snapshot CR's should be removed
- The new snapshot CR should be marked skipDelete
- Once the new snapshot CR has status complete, the previous latest snapshot has the skipDelete field removed
Undecided: whether the creator of the snapshots should control the removing of skipDelete or whether we expose some way to set a timeframe and let CRO clean them up.
HOW
TESTS
<List of related tests>
DONE
- is related to
-
MGDAPI-5705 Set GCP object lifecycle for snapshots
-
- Closed
-
- mentioned on