We're transitioning to Kubernetes for our company's software platform and have noticed a lot of advantages, like teams being able to independently develop and deploy services. However, we're facing challenges managing backups for our databases, which are running as StatefulSets. We're evaluating Kasten K10 and Velero, but we're struggling with how to perform backups and, particularly, how to manage restores based on different points in time. It feels like we're up against a sort of paradox similar to the CAP theorem. Has anyone dealt with this issue, and how did you resolve it?
7 Answers
Using the appropriate database tools is key for backing up your databases efficiently.
Velero has its limitations with StatefulSet databases since volume snapshots don't offer application awareness. You might need to implement pre-hooks for consistent database dumps. Kasten can handle this more smoothly. What specific databases are you using?
Database operators that come with built-in backup CRDs work great with Velero. The operator manages application-consistent snapshots while Velero handles orchestration, making point-in-time restores a lot cleaner. What database engines are you working with?
Don't forget about Volsync! It's particularly effective for data-only backups and restores, especially if you're implementing GitOps.
It's generally not advisable to run databases in Kubernetes for production unless you're using an operator that manages them effectively, like CNPG for Postgres. This allows you to perform point-in-time recovery or full backups easily.
The restore issue with microservices can be tricky because each database can have its own timeline. Have you thought about using database-native tools like pg_dump through CronJobs in combination with Velero?
For our Postgres databases, we do point-in-time recovery using the Barman cloud plugin and the CNPG operator. It simplifies everything. Just make sure you have the plugin set up properly with a sidecar container.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures