cloudnative-pg: Barman DB restore is getting failed for Replica clusters

Hi Team We are trying to integrate OpenStack Swift s3 storage with open-source cloudnative-pg for Kubernetes. We have a Primary Postgres cluster running with barmanobjectstore to store backups. We can integrate the Swift S3 storage with the Primary Postgres cluster and create on-demand backups successfully. But, when we try to restore the backups from S3 storage for Replica clusters, it throws the below error. ERROR: Barman cloud restore exception: not a gzip file","pipe":"stderr","logging_pod":"edb-primary-cluster-1-full-recovery"} We can see backups are available in the S3 bucket in gzip format. How can we fix this issue? It looks like the backup gzip file is corrupted but why?

I am using the below Postgis and operator images for configuration: Postgis: ghcr.io/cloudnative-pg/postgis:11-3.3-64 Operator: ghcr.io/cloudnative-pg/cloudnative-pg:1.20.0

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 25 (10 by maintainers)

Most upvoted comments

I doubt it’s CNPG issue. I’d suspect something’s wrong either on barman-cloud or Swift storage level (S3 implementation ?). You can try another test - provision a cluster, open container’s shell and try to make a backup using barman-cloud-backup command directly, with maximux verbose output level (-vv). In order to run barman-cloud-backup You’ll need to export below variables: export AWS_SECRET_ACCESS_KEY= export AWS_ACCESS_KEY_ID= export AWS_CA_BUNDLE=/controller/certificates/backup-barman-ca.crt and of course set barman-cloud-backup cmdline options to point it to S3 storage. Debug info shoud show the whole communication with S3 on the http level. That can give some insight into what actually is going on.