kartoza / docker-pg-backup

A cron job that will back up databases running in a docker postgres container
GNU General Public License v2.0
452 stars 103 forks source link

no option to run backup once #76

Closed troyliu0105 closed 1 year ago

troyliu0105 commented 1 year ago

Thanks for this amazing work!!! but I noticed that it seems no way to skip the built-in cron schedule. in k8s, we have cronjob controller to schedule job, to run & exit. And I think if there is a RUN_ONCE would be better, more friendly to k8s.

NyakudyaA commented 1 year ago

@troyliu0105 Does the associated PR fix this issue for you ?

troyliu0105 commented 1 year ago

Thanks!!! It works like a charm!

NyakudyaA commented 1 year ago

@troyliu0105 How are you running this in Kubernetes with the job scheduler? Trying to implement the same but if I run the backup script directly it doesn't find all the envs

troyliu0105 commented 1 year ago

@NyakudyaA sorry for the delay. You should build the docker image yourself. The image in the author's repo is not newest.

NyakudyaA commented 1 year ago

@troyliu0105 The image has been updated. I meant how do you run it in Kubernetes because it requires /backup-scripts/pgenv.sh which is only activated in start.sh