reactive-tech / kubegres

Kubegres is a Kubernetes operator allowing to deploy one or many clusters of PostgreSql instances and manage databases replication, failover and backup.
https://www.kubegres.io
Apache License 2.0
1.32k stars 74 forks source link

/tmp/backup_database.sh: Permission denied error for backup pod #80

Closed NiniiGit closed 2 years ago

NiniiGit commented 2 years ago

Hi @alex-arica /Team,

I am relatively new to the Kubegres and evaluating it for our use case. I have tried to setup Kubegres 3 pod cluster setup along with backup feature enabled by following the documentation mentioned here: https://www.kubegres.io/doc/enable-backup.html.

When checked, could see that the pod created(by cronjob) to take backup is failing constantly and going into "CrashLoopBackOff" mode. When checked, could see below single message into pod log

Message:

sh: 1: /tmp/backup_database.sh: Permission denied

Do I need to manually amend the backup cronjob and add command like "chmod 777 /tmp/backup_database.sh" as a workaround?

Could you advise how to permanently fix it? (Or if its bug!). If not then are their any prereq that I need to check with?

Regards, Ninad

alex-arica commented 2 years ago

Hi @NiniiGit ,

To override the default backup of Kubegres, I assume you have created your backup script in a custom ConfigMap. Or did you keep the default backup available with Kubegres?

Could you please share the content of the ConfigMap where the backup script is?

And could you please share the Kubegres YAML that you used?

NiniiGit commented 2 years ago

Hi @alex-arica ,

Apology to come very late on this (as was on medical leave). We can close this issue as found out that the script /tmp/backup_database.sh was missing to be added while customising the confimap