cross-posted from: https://lemmy.ml/post/16693054
Is there a feature in a CI/CD pipeline that creates a snapshot or backup of a service’s data prior to running a deployment? The steps of a ideal workflow that I am searching for are similar to:
- CI tool identifies new version of service and creates a pull request
- Manually merge pull request
- CD tool identifies changes to Git repo
- CD tool creates data snapshot and/or data backup
- CD tool deploys update
- Issue with deployment identified that requires rollback
- Git repo reverted to prior commit and/or Git repo manually modified to prior version of service
- CD tool identifies the rolled back version
- (OPTIONAL) CD tool creates data snapshot and/or data backup
- CD tool reverts to snapshot taken prior to upgrade
- CD tool deploys service to prior version per the Git repo
- (OPTIONAL) CD tool prunes data snapshot and/or data backup based on provided parameters (eg - delete snapshots after _ days, only keep 3 most recently deployed snapshots, only keep snapshots for major version releases, only keep one snapshot for each latest major, minor, and patch version, etc.)
Are you using PersistentVolumes? If your storage class supports it, looks like there’s a volume snapshot concept you can use, have you looked into that?
Yes, I am using PersistentVolumes. I have played around with different tools that have backup/snapshot abilities, but I haven’t seen a way to integrate that functionality with a CD tool. I’m sure if I spent enough time working through things, I may be able to put together something that allows the CD tool to take a snapshot. However, I think that having it handle rollbacks would be a bit too much for me to handle without assistance.