cloudnative-pg / cloudnative-pg/plugin-barman-cloud

backup method changed in the output of kubectl get backup

Đang mở
#602 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
question
Ngôn ngữ chính
Go
Star
191
Fork
72
Merge trung bình
1 ngày 16 giờ
Pull request đã merge (30 ngày)
18

Mô tả

Hi, Team !

I have my CNPG 1.26.1 cluster with Barman Native configured.

```
tee $cluster_name.yaml << EOF
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: $cluster_name
namespace: $oname-system
spec:
instances: 3
imageName: $cnpg_image_name
storage:
size: 1Gi
backup:
retentionPolicy: "1d"
barmanObjectStore:
destinationPath: s3://cluster-backups/
endpointURL: http://minio-service:9000
s3Credentials:
accessKeyId:
name: minio-creds
key: ACCESS_KEY_ID
secretAccessKey:
name: minio-creds
key: ACCESS_SECRET_KEY
wal:
compression: gzip
EOF
```

```
tee barman-backup.yaml << EOF
apiVersion: postgresql.cnpg.io/v1
kind: Backup
metadata:
name: barman-backup
namespace: $oname-system
spec:
cluster:
name: $cluster_name
target: prefer-standby
EOF
```

I have two backups:
- `barman-backup` is done by `kubectl apply -f barman-backup.yaml`
- `cluster-barman-cnpg-20251016101137` is done by `kubectl cnpg -n $oname-system backup $cluster_name -m barmanObjectStore`

```
[alexey@wsl2 ~]$ kubectl get -n $oname-system backup
NAME AGE CLUSTER METHOD PHASE ERROR
barman-backup 57s cluster-barman-cnpg barmanObjectStore completed
cluster-barman-cnpg-20251016101137 6s cluster-barman-cnpg barmanObjectStore completed
```

Now I'm migrating to Barman Plugin 0.7.0:

```
tee $cluster_name.yaml << EOF
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: $cluster_name
namespace: $oname-system
spec:
instances: 3
imagePullPolicy: Always
imageName: $cnpg_image_name
storage:
size: 1Gi
plugins:
- name: barman-cloud.cloudnative-pg.io
isWALArchiver: true
parameters:
barmanObjectName: minio-store
EOF
```

```
tee barman-backup.yaml << EOF
apiVersion: postgresql.cnpg.io/v1
kind: Backup
metadata:
name: barman-backup
namespace: $oname-system
spec:
cluster:
name: $cluster_name
method: plugin
pluginConfiguration:
name: barman-cloud.cloudnative-pg.io
target: prefer-standby
EOF
```

After launching `kubectl apply -f barman-backup.yaml` I have the following:

```
[alexey@wsl2 ~]$ kubectl get -n $oname-system backup
NAME AGE CLUSTER METHOD PHASE ERROR
barman-backup 14m cluster-barman-cnpg plugin completed
cluster-barman-cnpg-20251016101137 13m cluster-barman-cnpg barmanObjectStore completed
```

So, somehow the `METHOD` for my older `barman-backup` backup has been changed from `barmanObjectStore` to `plugin`:

```
[alexey@wsl2 ~]$ kubectl get -n $oname-system backup
NAME AGE CLUSTER METHOD PHASE ERROR
barman-backup 57s cluster-barman-cnpg barmanObjectStore completed
cluster-barman-cnpg-20251016101137 6s cluster-barman-cnpg barmanObjectStore completed
```

Is it by design ? If not, can it be fixed ?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Báo cáo tập trung vào tài nguyên Backup được hiển thị thông qua `kubectl get backup` và quá trình di chuyển CNPG Barman plugin. Trước tiên, hãy tái hiện quá trình di chuyển từ `barmanObjectStore` sang `plugin` và kiểm tra xem việc áp dụng manifest Backup mới có thay đổi METHOD của đối tượng hiện có hay không; được xem là hoàn tất khi method của backup ban đầu vẫn chính xác hoặc hành vi này được ghi lại là có chủ đích.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
kubernetes, postgresql
Lĩnh vực
cloud, databases
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.