Closed sseago closed 2 years ago
One additional documentation note: The post-restore script will fail for Velero restores with names exceeding 63 chars, since those names are not valid labels.
This is cool
Note the bash script above has been added in a PR to oadp-operator to doc/scripts
@dymurray I've updated the PR to reflect the proposed label name changes, as well as updating it to work with the new GetBackup method signature.
When using default volumes to restic, disconnect DeploymentConfig pods from ReplicationController and label for later cleanup. For DeploymentConfigs, set replicas to zero (and paused to false) and annotate/label for later cleanup.
After restore completes, a post-restore bash script must be run to clean up restic restore pods and restore DC to prior configuration.
Note that this is currently only done when the backup sets defaultVolumesToRestic=true -- for the restic annotation case, we don't know in the DeploymentConfig plugin that the DC had its pods disconnected. To enable this case we may need to add another backup annotation to communicate the user's desire to disconnect all DC pods and scale down DCs.
Also, note that this does not currently handle the case for post-restore hooks on DC pods. For restore-level hooks, this could be added similarly to what's being done w/ the defaultVolumesToRestic config. For pod annotations, the concerns are similar to restic annotations.
Also note that following a successful restore, the following script would need to be run in order to clean up the restore pods and restore the DC to its prior configuration (script location in github still pending):