Kubernetes Backup and Restore

Is there an option to backup and restore DB using Kubernetes? I’ve tried entering the container and executing manually the backup and restore commands. Is there a way to do the restore automatically when the pod is created? I’m using `memsql/cluster-in-a-box’.

Also, I would like to run the backup regularly.

There’s nothing specific that I know of in Kubernetes to do a backup and restore with SingleStore DB. You can use any external job control system, like a cron job, and have it connect to your cluster and run the BACKUP command.

I see, thanks. Can I edit cluster-in-a-box to run custom queries when starting up, as the first action to take? To create a custom DB for instance.

There’s no way to schedule code to run at startup with SingleStore itself. You’d have to use some other mechanism, like an app or a cron job.

Thank you for making that clear. Is it possible to mount a volume and use that as the main storage for DBs? Working with volumes lets us start containers with the latest version of DBs in case of failure. Is it possible to implement it that way?

When you install SingleStore using sdb-deploy and sdb-admin you can put your data on any folder path you want, using the --datadir parameter.

This post discusses that at length.