Logical MySQL Backup for OpenShift

To demonstrate data protection for MySQL provided and deployed with OpenShift, the install should be performed according to the documentation provided here.

$ oc create namespace mysql
$ oc new-app https://raw.githubusercontent.com/openshift/origin/master/examples/db-templates/mysql-ephemeral-template.json \
      --namespace mysql -p MYSQL_ROOT_PASSWORD=secretpassword

A Blueprint resource should be created via the following command:

$ oc --namespace kasten-io apply -f \
    https://raw.githubusercontent.com/kanisterio/kanister/0.107.0/examples/mysql-deploymentconfig/blueprint-v2/mysql-dep-config-blueprint.yaml

Note

The MySQL backup example provided above serves as a blueprint template for logical backups in an OpenShift environment. Please note that these examples may need to be modified for specific production environments and setups. As a result, it is highly recommended to carefully review and modify the blueprints as needed before deploying them for production use.

Alternatively, use the Blueprints page on K10 Dashboard to create the Blueprint resource.

Once the Blueprint is created, annotate the DeploymentConfig with the below annotations to instruct K10 to use this Blueprint while performing data management operations on the MySQL instance.

$ oc --namespace mysql annotate deploymentconfig/mysql \
    kanister.kasten.io/blueprint=mysql-dep-config-blueprint

Finally, use K10 to backup and restore the application.