I have a small instance of influxdb running in my kubernetes cluster.
The data of that instance is stored in a persistent storage.
But I also want to run the backup command from influx at scheduled interval.
influxd backup -portable /backuppath
What I do now is exec into the pod and run it manually.
Is there a way that I can do this automatically?
CodePudding user response:
You can consider running a CronJob with bitnami kubectl which will execute the backup command. This is the same as exec into the pod and run
except now you automate it with CronJob.
CodePudding user response:
You can either run it as a cronjob and setup the image to be able to connect to the DB, or you can sidecar it alongside your db pod, and set it to run the cron
image (i.e. will run as a mostly-idle container in the same pod as your DB)