Open tianyue86 opened 2 months ago
hi @tianyue86
to backup and restore a PG cluster using wal-g you should
config wal-g
kbcli cluster backup <clusterName> --method config-wal-g
update parameters using ops
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
generateName: pg-cluster-reconfiguring-
spec:
clusterRef: <clusterName>
reconfigure:
componentName: postgresql
configurations:
- keys:
- key: postgresql.conf
parameters:
- key: archive_command
value: "'envdir /home/postgres/pgdata/wal-g/env /home/postgres/pgdata/wal-g/wal-g wal-push %p'"
name: postgresql-configuration
type: Reconfiguring
backup cluster
kbcli cluster backup <clusterName> --method wal-g
restore
kbcli cluster restore <clusterName> --backup <backupName>
Describe the bug
To Reproduce Steps to reproduce the behavior:
Create pg cluster kbcli cluster create postgres-icpzcz --termination-policy=DoNotTerminate --cluster-definition=postgresql --enable-all-logs=false --cluster-version=postgresql-14.8.0 --set cpu=100m,memory=0.5Gi,replicas=2,storage=3Gi --namespace default
Create backup
kbcli cluster backup postgres-icpzcz --method wal-g --namespace default
Restore cluster
kbcli cluster restore postgres-icpzcz-backup --backup backup-default-postgres-icpzcz-20240914124229 --namespace default
Check cluster status
See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.