PostgreSQL Backup Visibility #544

Open
opened 2026-06-01 13:33:57 +00:00 by tobru · 2 comments
Owner

Stories

As a user, I want to see that backups are made

Implementation Notes

See:

Self-service restore to be done in #613

## Stories _As a user, I want to see that backups are made_ ## Implementation Notes See: - https://docs.appcat.ch/vshn-managed/postgresql/restore.html - https://docs.appcat.ch/vshn-managed/postgresql/backup.html Self-service restore to be done in #613
Author
Owner

Input from Gabi:

Restore will create a new instance, therefore from my perspective there should be a button in the main dashboard of instance X where it says restore this instance and then a list of drop down backups will be presented (this should be requested via appcat api server k -n <instance-namespace> get backups.postgresql.cnpg.io), once user has chosen these parameters and accepted, then he/she will be presented with a new instance.

and

We already allow PIT recovery via restore.recoveryTimeStamp so we should also expose the second parameter besides backup name from fropdown menu - the timestamp

Input from Gabi: > Restore will create a new instance, therefore from my perspective there should be a button in the main dashboard of instance X where it says restore this instance and then a list of drop down backups will be presented (this should be requested via appcat api server `k -n <instance-namespace> get backups.postgresql.cnpg.io`), once user has chosen these parameters and accepted, then he/she will be presented with a new instance. and > We already allow PIT recovery via `restore.recoveryTimeStamp` so we should also expose the second parameter besides backup name from fropdown menu - the timestamp
tobru changed title from PostgreSQL Backup visibility and Restore to PostgreSQL Backup Visibility 2026-07-13 15:16:32 +00:00
Author
Owner

Information gathering:

❯ k -n org-47 get vshnpostgresbackups
BACKUP ID                           INSTANCE      STARTED                FINISHED               STATUS      AGE
postgresql-default-20260706200100   si-14f5ea51   2026-07-06T20:01:01Z   2026-07-06T20:01:05Z   completed   6d19h
postgresql-default-20260707200100   si-14f5ea51   2026-07-07T20:01:01Z   2026-07-07T20:01:05Z   completed   5d19h
postgresql-default-20260708200100   si-14f5ea51   2026-07-08T20:01:01Z   2026-07-08T20:01:05Z   completed   4d19h
postgresql-default-20260709200100   si-14f5ea51   2026-07-09T20:01:01Z   2026-07-09T20:01:06Z   completed   3d19h
postgresql-default-20260710200100   si-14f5ea51   2026-07-10T20:01:01Z   2026-07-10T20:01:05Z   completed   2d19h
postgresql-default-20260711200100   si-14f5ea51   2026-07-11T20:01:01Z   2026-07-11T20:01:05Z   completed   43h
postgresql-default-20260712200100   si-14f5ea51   2026-07-12T20:01:01Z   2026-07-12T20:01:05Z   completed   19h
premaint-20260708-210101            si-14f5ea51   2026-07-08T21:01:02Z   2026-07-08T21:01:06Z   completed   4d18h

❯ k -n org-47 get vshnpostgresbackups postgresql-default-20260706200100 -o yaml
apiVersion: api.appcat.vshn.io/v1
kind: VSHNPostgresBackup
metadata:
  annotations:
    cnpg.io/operatorVersion: 1.29.1
  creationTimestamp: "2026-07-06T20:01:00Z"
  generation: 1
  labels:
    cnpg.io/cluster: postgresql
    cnpg.io/immediateBackup: "false"
    cnpg.io/scheduled-backup: postgresql-default
  name: postgresql-default-20260706200100
  namespace: org-47
  ownerReferences:
  - apiVersion: postgresql.cnpg.io/v1
    controller: true
    kind: Cluster
    name: postgresql
    uid: 62566c6d-60eb-4a19-a2b5-796b3e26605a
  resourceVersion: "135142579"
  uid: bf2c1e92-7156-4e44-84e7-3a8357f76470
status:
  backupInformation:
    backupId: 20260706T200101
    backupName: backup-20260706200100
    beginLSN: 0/11000028
    beginWal: "000000010000000000000011"
    destinationPath: null
    endLSN: 0/11000120
    endWal: "000000010000000000000011"
    serverName: null
  databaseInstance: si-14f5ea51
  process:
    jobPod: postgresql-1
    status: completed
    timing:
      end: "2026-07-06T20:01:05Z"
      start: "2026-07-06T20:01:01Z"

in instance ns:

❯ k -n vshn-postgresql-si-14f5ea51-s2j96 get backups.postgresql.cnpg.io
NAME                                AGE     CLUSTER      METHOD   PHASE       ERROR
postgresql-default-20260706200100   6d19h   postgresql   plugin   completed   
postgresql-default-20260707200100   5d19h   postgresql   plugin   completed   
postgresql-default-20260708200100   4d19h   postgresql   plugin   completed   
postgresql-default-20260709200100   3d19h   postgresql   plugin   completed   
postgresql-default-20260710200100   2d19h   postgresql   plugin   completed   
postgresql-default-20260711200100   43h     postgresql   plugin   completed   
postgresql-default-20260712200100   19h     postgresql   plugin   completed   
premaint-20260708-210101            4d18h   postgresql   plugin   completed   
❯ k -n vshn-postgresql-si-14f5ea51-s2j96 get backups.postgresql.cnpg.io postgresql-default-20260706200100 -o yaml
apiVersion: postgresql.cnpg.io/v1
kind: Backup
metadata:
  annotations:
    cnpg.io/operatorVersion: 1.29.1
  creationTimestamp: "2026-07-06T20:01:00Z"
  generation: 1
  labels:
    cnpg.io/cluster: postgresql
    cnpg.io/immediateBackup: "false"
    cnpg.io/scheduled-backup: postgresql-default
  name: postgresql-default-20260706200100
  namespace: vshn-postgresql-si-14f5ea51-s2j96
  ownerReferences:
  - apiVersion: postgresql.cnpg.io/v1
    controller: true
    kind: Cluster
    name: postgresql
    uid: 62566c6d-60eb-4a19-a2b5-796b3e26605a
  resourceVersion: "135142579"
  uid: bf2c1e92-7156-4e44-84e7-3a8357f76470
spec:
  cluster:
    name: postgresql
  method: plugin
  pluginConfiguration:
    name: barman-cloud.cloudnative-pg.io
status:
  backupId: 20260706T200101
  backupName: backup-20260706200100
  beginLSN: 0/11000028
  beginWal: "000000010000000000000011"
  endLSN: 0/11000120
  endWal: "000000010000000000000011"
  instanceID:
    ContainerID: containerd://1d7fce772de3a5aa54bb2e31847cff55f1178974f35899e691f647eba9ba8eef
    podName: postgresql-1
    sessionID: ea7f2a6f-c057-4f29-8702-b9b9d393e575
  majorVersion: 18
  method: plugin
  online: true
  phase: completed
  pluginMetadata:
    clusterUID: 62566c6d-60eb-4a19-a2b5-796b3e26605a
    displayName: BarmanCloudInstance
    name: barman-cloud.cloudnative-pg.io
    pluginName: barman-cloud.cloudnative-pg.io
    timeline: "1"
    version: 0.12.0
  reconciliationStartedAt: "2026-07-06T20:01:00Z"
  reconciliationTerminatedAt: "2026-07-06T20:01:10Z"
  startedAt: "2026-07-06T20:01:01Z"
  stoppedAt: "2026-07-06T20:01:05Z"
Information gathering: ``` ❯ k -n org-47 get vshnpostgresbackups BACKUP ID INSTANCE STARTED FINISHED STATUS AGE postgresql-default-20260706200100 si-14f5ea51 2026-07-06T20:01:01Z 2026-07-06T20:01:05Z completed 6d19h postgresql-default-20260707200100 si-14f5ea51 2026-07-07T20:01:01Z 2026-07-07T20:01:05Z completed 5d19h postgresql-default-20260708200100 si-14f5ea51 2026-07-08T20:01:01Z 2026-07-08T20:01:05Z completed 4d19h postgresql-default-20260709200100 si-14f5ea51 2026-07-09T20:01:01Z 2026-07-09T20:01:06Z completed 3d19h postgresql-default-20260710200100 si-14f5ea51 2026-07-10T20:01:01Z 2026-07-10T20:01:05Z completed 2d19h postgresql-default-20260711200100 si-14f5ea51 2026-07-11T20:01:01Z 2026-07-11T20:01:05Z completed 43h postgresql-default-20260712200100 si-14f5ea51 2026-07-12T20:01:01Z 2026-07-12T20:01:05Z completed 19h premaint-20260708-210101 si-14f5ea51 2026-07-08T21:01:02Z 2026-07-08T21:01:06Z completed 4d18h ❯ k -n org-47 get vshnpostgresbackups postgresql-default-20260706200100 -o yaml apiVersion: api.appcat.vshn.io/v1 kind: VSHNPostgresBackup metadata: annotations: cnpg.io/operatorVersion: 1.29.1 creationTimestamp: "2026-07-06T20:01:00Z" generation: 1 labels: cnpg.io/cluster: postgresql cnpg.io/immediateBackup: "false" cnpg.io/scheduled-backup: postgresql-default name: postgresql-default-20260706200100 namespace: org-47 ownerReferences: - apiVersion: postgresql.cnpg.io/v1 controller: true kind: Cluster name: postgresql uid: 62566c6d-60eb-4a19-a2b5-796b3e26605a resourceVersion: "135142579" uid: bf2c1e92-7156-4e44-84e7-3a8357f76470 status: backupInformation: backupId: 20260706T200101 backupName: backup-20260706200100 beginLSN: 0/11000028 beginWal: "000000010000000000000011" destinationPath: null endLSN: 0/11000120 endWal: "000000010000000000000011" serverName: null databaseInstance: si-14f5ea51 process: jobPod: postgresql-1 status: completed timing: end: "2026-07-06T20:01:05Z" start: "2026-07-06T20:01:01Z" ``` in instance ns: ``` ❯ k -n vshn-postgresql-si-14f5ea51-s2j96 get backups.postgresql.cnpg.io NAME AGE CLUSTER METHOD PHASE ERROR postgresql-default-20260706200100 6d19h postgresql plugin completed postgresql-default-20260707200100 5d19h postgresql plugin completed postgresql-default-20260708200100 4d19h postgresql plugin completed postgresql-default-20260709200100 3d19h postgresql plugin completed postgresql-default-20260710200100 2d19h postgresql plugin completed postgresql-default-20260711200100 43h postgresql plugin completed postgresql-default-20260712200100 19h postgresql plugin completed premaint-20260708-210101 4d18h postgresql plugin completed ❯ k -n vshn-postgresql-si-14f5ea51-s2j96 get backups.postgresql.cnpg.io postgresql-default-20260706200100 -o yaml apiVersion: postgresql.cnpg.io/v1 kind: Backup metadata: annotations: cnpg.io/operatorVersion: 1.29.1 creationTimestamp: "2026-07-06T20:01:00Z" generation: 1 labels: cnpg.io/cluster: postgresql cnpg.io/immediateBackup: "false" cnpg.io/scheduled-backup: postgresql-default name: postgresql-default-20260706200100 namespace: vshn-postgresql-si-14f5ea51-s2j96 ownerReferences: - apiVersion: postgresql.cnpg.io/v1 controller: true kind: Cluster name: postgresql uid: 62566c6d-60eb-4a19-a2b5-796b3e26605a resourceVersion: "135142579" uid: bf2c1e92-7156-4e44-84e7-3a8357f76470 spec: cluster: name: postgresql method: plugin pluginConfiguration: name: barman-cloud.cloudnative-pg.io status: backupId: 20260706T200101 backupName: backup-20260706200100 beginLSN: 0/11000028 beginWal: "000000010000000000000011" endLSN: 0/11000120 endWal: "000000010000000000000011" instanceID: ContainerID: containerd://1d7fce772de3a5aa54bb2e31847cff55f1178974f35899e691f647eba9ba8eef podName: postgresql-1 sessionID: ea7f2a6f-c057-4f29-8702-b9b9d393e575 majorVersion: 18 method: plugin online: true phase: completed pluginMetadata: clusterUID: 62566c6d-60eb-4a19-a2b5-796b3e26605a displayName: BarmanCloudInstance name: barman-cloud.cloudnative-pg.io pluginName: barman-cloud.cloudnative-pg.io timeline: "1" version: 0.12.0 reconciliationStartedAt: "2026-07-06T20:01:00Z" reconciliationTerminatedAt: "2026-07-06T20:01:10Z" startedAt: "2026-07-06T20:01:01Z" stoppedAt: "2026-07-06T20:01:05Z" ```
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
servala/servala-portal#544
No description provided.