-1

i am having Kubernetes cluster on digital ocean and running database inside k8s pod.

I am planning for schedule backup eveyday so what is best way for everyday auto backup. JOB or JENKINS ?

Database is not exposed outside using any service

if i use K8s job how to store backup in PVC and how to delete old one?

I am already running script to take snapshot of volume via jenkin is good way to restore?

Jonas
  • 121,568
  • 97
  • 310
  • 388
Harsh Manvar
  • 27,020
  • 6
  • 48
  • 102

1 Answers1

1

you can consider one of the below approach

  1. Create a CronJob in k8s and run backup using mysql service dns.
  2. install cron inside mysql container ( update mysql image with cron) and run mysql backup at scheduled interval. archive the backup and push it to s3 storage.
P Ekambaram
  • 15,499
  • 7
  • 34
  • 59