I use MySQL statefulset because of latency issues with Azure MYSQL. It is using Persistence Volume Claim and I created it using this documentation https://kubernetes.io/docs/tasks/run-application/run-replicated-stateful-application/.
I would like to take safe consistent backups
- Use cronjob mysqldump but it will not be able to create a full backup and it is adding locks to tables.
- Use percona xtrabackup but it needs access to /var/lib/mysql so I am not sure if I can achieve that with cron Kubernetes service.
- Block writes to mysql for some seconds and then do a snapshot of the Persistent Volume using Azure Services.
Do you have any idea how to do Azure backups on daily basis?