Failed to backup in Red Hat OCP cluster #914
Replies: 3 comments 6 replies
-
Hi If you're using the prebackup command, then you don't have to specify the We're doing redis backups on ocp like this: redis pod: apiVersion: v1
kind: Pod
metadata:
annotations:
k8up.io/backupcommand: /scripts/backup.sh
k8up.io/file-extension: .tar
name: redis-master-0
namespace: myredis
spec:
containers:
... The backup: apiVersion: k8up.io/v1
kind: Backup
metadata:
creationTimestamp: "2023-12-06T23:14:00Z"
spec:
backend:
repoPasswordSecretRef:
key: password
name: k8up-repository-password
s3:
accessKeyIDSecretRef:
key: AWS_ACCESS_KEY_ID
name: backup-bucket-credentials
bucket: redis-app1-prod-wv8ss-backup
endpoint: https://myobjectstorage
secretAccessKeySecretRef:
key: AWS_SECRET_ACCESS_KEY
name: backup-bucket-credentials
keepJobs: 0 We've also marked all the PVCs in the namespace so they don't get backed up, otherwise we'd end up with backing up the data twice. Also, is the postgresql you're trying to backup running as a pod as well? Because then you can actually skip the pre-backup pod and set the backup annotations directly on there. See my example above. Here are the docs: https://k8up.io/k8up/2.7/how-tos/application-aware-backups.html The main use-case for pre-backup pods is to backup stuff that doesn't have a pod running on the cluster. For example if you want to backup a database that is not running on your cluster. As for |
Beta Was this translation helpful? Give feedback.
-
Hi, Thanks for that. After removing the podSecurityContext, the permission error is gone. However I still see the error in last line. I need PreBackup pod because I have to run pg_dump against 3 databases in PostgresSQL. If I use annotation, it backs up to a single snapshot in S3 and restoring them will be even trickier. K8up seems to be picking up the Kubernetes API server details from the mounted service files. Not clear how it could go wrong. |
Beta Was this translation helpful? Give feedback.
-
Finally, I figured it was due to proxy settings added in Backup resource:
I added a no_proxy to skip internal address of K8s. I needed the proxy only for communicating with AWS S3
|
Beta Was this translation helpful? Give feedback.
-
I'm trying to test backup of Postgres DB by deploying k8up in a OCP cluster.
Pre-Backup pod is defined as,
Backup is defined as,
On trigerring the backup, the pods fail with this error. Please see the error in last two lines. Is the permission error causing the failure to backup or the error in last line?
Beta Was this translation helpful? Give feedback.
All reactions