Best Practices for Backing Up Bitnami MariaDB Galera on Kubernetes

0
9
Asked By CuriousCat99 On

Hey everyone! I've recently transitioned from a standalone MariaDB setup to a Bitnami MariaDB Galera cluster running on Kubernetes. Previously, I had a simple `CronJob` that utilized `mariadb-dump` every 10 minutes to keep my database backups stored in a PVC. It was a straightforward process for restoration, and I always knew what my backups contained.

Now, with Galera, I'm looking for the cleanest method to back up the databases themselves, rather than just snapshotting the persistent volumes using Velero. Here's what I'm aiming for:

- Logical or physical backups that I can easily restore into a new cluster if necessary.
- Consistent backups across the cluster (though only one node is needed since they're synced, I need to avoid issues if one pod fails).
- A solution that's simple to manage and won't turn into a massive operational headache.
- Bonus points for quick restoration times.

I know that `mariadb-backup` is the recommended tool for Galera, but I'm finding the integration with Kubernetes (like using CronJobs, managing pods/PVCs, confirming node synchronization, etc.) a bit cumbersome. How is everyone else managing their MariaDB Galera backups in K8s?

- Are you running `mariabackup` inside the pods as a sidecar or init container?
- Do you execute commands inside one of the StatefulSet pods via a CronJob?
- Or do you opt for logical dumps (`mariadb-dump`) even with Galera?
- Any tips for simplifying the restore process?

I'd really appreciate hearing about any real-world setups or best practices. Thanks!

3 Answers

Answered By DevGuru2023 On

You’re not alone in this migration! As for backups, since you’re already dealing with Kubernetes, have you considered using the MariaDB operator? It definitely streamlines day-two operations and supports both logical and physical backups. Check out their documentation on it for some good practices!

TechieRocks -

Totally agree! The operator has some solid advantages, especially with automated recovery options.

Answered By CloudNinja88 On

If you're looking for an effective and straightforward approach, I recommend running `mariabackup` as an init container. It allows you to back up without complicating your existing setup too much, and you can ensure consistency across the nodes easily. Just make sure your pods are synced before running it!

BackupWiz -

Yeah, and if you ever have issues with pod availability, consider scheduling backups when the load is lighter.

Answered By KubeSavvy On

I’d say sticking with logical dumps could work too, especially if you're comfortable with them. They’re easy to manage and can still work effectively with a Galera setup. Just ensure you manage the synchronization aspect properly to avoid issues.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.