apiVersion: sql.tanzu.vmware.com/v1
kind: PostgresBackup
metadata:
name: backup-sample
spec:
sourceInstance:
name: postgres-sample
type: full
The sections below explain the properties that can be set for the PostgresBackup resource.
Type: String
Required
Default: n/a
The name of the PostgresBackup. Must be unique within a namespace.
Example:
backup-sample
The spec describes the desired state for the Postgres backup object.
Type: Object
Required
Default: n/a
The fields that describe the Postgres instance backup are name
and type
:
name
Type: String
Required
Default: n/a
The name of the Postgres instance on which you want to perform the on-demand backup.
Example
my-postgres-sample
type
Type: String
Optional
Default: full
The type of the Postgres Backup you want to take. The possible values full, incremental, or differential.
Example
incremental
The status fields show the observed status of the PostgresBackup object and these fields are populated by the controller that processes backups.
Type: string
This field reflects the current state of the PostgresBackup resource. It can be empty or have the following values: Running, Failed, or Succeeded.
Type: string
This field denotes the backup label. For e.g. 20220306-155026F_20220306-155048F. Backup labels for full backups ends with F, differential ends with D, and incremental ends with I.
Type: time
This field denotes the time when the backup started
Type: time
This field indicates the time when the backup got completed. This field is populated once the PostgresBackup CR reaches Failed or Succeeded state. It is empty when the backup is running.
Type: string
This field contains the name of the backupLocation that's configured on the instance for which this backup is being taken.
Type: string
This field denotes the database name associated with the instance. It is same as the instance's spec.PgConfig.Dbname
Type: string
This field shows the backup stanza name of the instance for which the backup was taken. It has the format of
Type: Object
This field shows the current state of the PostgresBackup resource. It is useful for debugging. If the backup fails, this field would show the failure and the corresponding error message. For e.g.:
Conditions:
Last Transition Time: 2022-03-21T21:33:14Z
Message: pgbackrest failed with error: WARN: environment contains invalid option 'config-version'ERROR: [050]: unable to acquire lock on file '/tmp/pgbackrest/default-postgres-sample2-backup.lock': Resource temporarily unavailable HINT: is another pgBackRest process running?
Reason: PgbackrestFailure
Status: True
Type: BackupFailed