MySQL-backup-to-azure is a docker container that will connect to your specified MySQL server, create a database dump of all your databases and write the contents to Azure Blob Storage.
- Azure Storage Account - you'll need to of created the storage account and create a container inside of it. Make a note of the storage account name and key.
- Kubernetes or Docker Enviromment.
Docker is very easy to setup, you can schedule a cronjob to run at your desired backup interval.
Kubernetes has the ability to run its own cronjobs. The below instructions schedule the container to run at midnight daily.
Create the following YAML and update the values to your MySQL server and Azure Storage Account Credentials.
Next we need to create the Kubernetes cronjob. You can apply this directly from the GitHub Repository.
kubectl apply -f https://raw.githubusercontent.com/adamhancock/mysql-backup-to-azure/master/k8s/cronjob.yml
The default schedule will run at midnight daily. This can be updated by editing the schedule value inside the K8s cronjob.