I am running a mariadb 10.1 instance with all innodb tables and a replication slave in a k8s cluster on Google Cloud's GKE. I have a scheduled mysqldump that runs every night. But for additional security, I am working on a mariabackup implementation that will run on the slave pod. Ideally this would create an incremental backup on an hourly basis. The database is not that large, but growing, around 20GB.
But as I work out the logistics of exporting the backup, whether to external object store or just a separate disk, I am wondering if GCP's own snapshot feature would not be an easier and cheaper solution than using mariabackup at all.
My understanding of mariabackup is that it makes an un-modified copy of the underlying database files. The tables are not necessarily consistent, so upon restore, you must --prepare the files to make them consistent. You can then copy them over to the live folder and restart the instance. - https://mariadb.com/kb/en/library/how-mariabackup-works/
This leaves me with base copies and separate folders for incremental copies that I supposed I could send directly to object storage. Then of course write a restore script that can pull in and prepare the base backup and each incremental backup individually up to the point I need to restore.
The other option is simply to schedule an hourly snapshot in GCP. It takes an incremental snapshot and can be restored to a disk at any given point.
Am I missing anything? GCP seems to indicate that their snapshots are close to consistent, but in a write heavy environment, they won't be perfect. Would this be likely to cause problems? Can innodb recover from small inconsistencies? And am I missing out on anything else by using snapshots instead of something like mariabackup?