Backup & Restore of single database

We are thinking of migrating our databases to Percona Operator for MySQL based on Percona XtraDB Cluster.

The backup and restore options look promising, but as I understand the backup process will backup the entire cluster. Is it possible to make separate backups per database within the XtraDB cluster? If not, I’m interested to know why not. Maybe it’s best practice to run only one database per cluster?

Looking forward to learn more about this.

1 Like

Hello,
The K8S operator doesn’t support individual database backups. It would be insanely complex to have such a feature. The restore process would be even more complex as you would have to manage tablespace import/export/creation.

You can absolutely create logical per-database dumps using mydumper.

1 Like

Thanks for your reply @matthewb. Are there any resources you could maybe point me to on how to achieve logical per-database backups using mydumper with k8s?

Is there an operator for this or would I have to write my own cron jobs?

1 Like

You would have to write your own job for this. You can create a logical dump just like any other MySQL setup. Just tell mydumper to connect to mysql on one of the pods. Because it is PXC, all the data is the same on all 3 nodes so it doesn’t matter which one you connect.

1 Like