diff --git a/deploy/cr.yaml b/deploy/cr.yaml index 0be73896e..7d59f1394 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -5,6 +5,7 @@ metadata: # finalizers: # - percona.com/delete-pvc # - percona.com/delete-ssl +# - percona.com/delete-backups spec: crVersion: 2.6.0 # secrets: diff --git a/percona/controller/pgcluster/finalizer.go b/percona/controller/pgcluster/finalizer.go index 1f558ec8a..614ec329c 100644 --- a/percona/controller/pgcluster/finalizer.go +++ b/percona/controller/pgcluster/finalizer.go @@ -178,7 +178,8 @@ func (r *PGClusterReconciler) deleteBackups(ctx context.Context, cr *v2.PerconaP pod := podList.Items[0] var stdout, stderr bytes.Buffer - cmd := "pgbackrest --stanza=db --log-level-console=info stop; pgbackrest --stanza=db --log-level-console=info --repo=%s stanza-delete --force" + cmd := "pgbackrest --stanza=db --log-level-console=info stop; " + + "pgbackrest --stanza=db --log-level-console=info --repo=%s stanza-delete --force" for _, repo := range cr.Spec.Backups.PGBackRest.Repos { c := fmt.Sprintf(cmd, strings.TrimPrefix(repo.Name, "repo"))