cloudnative-pg / cloudnative-pg/plugin-barman-cloud
Unable to cluster:/spec/bootstrap/recovery/backup when backup is a plugin-barman-cloud
- Dominant language
- Go
- Stars
- 191
- Forks
- 72
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 21
Description
cnpg version 1.27
plugin-barman-cloud v0.6.0
Given a backup
```
apiVersion: postgresql.cnpg.io/v1
kind: Backup
metadata:
labels:
cnpg.io/cluster: db1
name: db1-20250903144632
namespace: db-staging
spec:
cluster:
name: db1
method: plugin
pluginConfiguration:
name: barman-cloud.cloudnative-pg.io
```
I want to bootstrap a cluster
```
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: db2
namespace: db-staging
spec:
backup:
volumeSnapshot:
className: nodebound-storage-snapclass
bootstrap:
recovery:
backup:
name: db1-20250903144632
[...]
```
I get errors
```
{
"level":"error",
"ts":"2025-09-04T08:22:02.392371161Z",
"msg":"restore error",
"logging_pod":"db2-1-full-recovery",
"error":"while restoring cluster: missing Azure credentials",
"stacktrace":"github.com/cloudnative-pg/machinery/pkg/log.(*logger).Error\n\tpkg/mod/github.com/cloudnative-pg/machinery@v0.3.1/pkg/log/log.go:125\ngithub.com/cloudnative-pg/cloudnative-pg/internal/cmd/manager/instance/restore.NewCmd.func1\n\tinternal/cmd/manager/instance/restore/cmd.go:101\ngithub.com/spf13/cobra.(*Command).execute\n\tpkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1015\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tpkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1148\ngithub.com/spf13/cobra.(*Command).Execute\n\tpkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1071\nmain.main\n\tcmd/manager/main.go:71\nruntime.main\n\t/opt/hostedtoolcache/go/1.24.6/x64/src/runtime/proc.go:283"
}
```
* The backup manifest does not contain a reference to the ObjectStore.
* Adding a `/spec/plugins` section to the Cluster does not work
* Adding an `externalClusters` entry does not work as the bootstrap-recovery-backup spec only allows name
Is there a way to use an existing Backup object to bootstrap a Cluster ?
Contributor guide
Assessment
This issue has not been assessed yet.