PostgresBackup Synopsis

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.

Metadata

name

Type: String
Required
Default: n/a
The name of the PostgresBackup. Must be unique within a namespace.
Example:
backup-sample

Spec

The spec describes the desired state for the Postgres backup object.

sourceInstance

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

expire

Type: Boolean
Optional
Default: false
The field determines if the backup will expire.
Example:
true

Status

The status fields show the observed status of the PostgresBackup object and these fields are populated by the controller that processes backups.

phase

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.

restoreLabel

Type: string
This field denotes the backup label. For example 20220306-155026F_20220306-155048F. Backup labels for full backups end with F, differential backups end with D, and incremental backups end with I.

timeStarted

Type: time
This field denotes the time when the backup started.

timeCompleted

Type: time
This field indicates the time when the backup completed. This field is populated once the PostgresBackup CR reaches Failed or Succeeded state. It is empty when the backup is running.

backupLocation

Type: string
This field contains the name of the backupLocation that's configured on the instance for which this backup is being taken.

dbName

Type: string
This field denotes the database name associated with the instance. It is same as the instance's spec.PgConfig.Dbname

size

Type: string
This field shows the size of the successful backup. The backups are measured in B, KB, MB, GB or TB.

stanzaName

Type: string
This field shows the backup stanza name of the instance for which the backup was taken. It has the format of <namespace>-<instance name>-<unique ID of the instance>.

executionCount

Type: integer
This field shows the number of times this backup was executed. This value should typically be 1 unless a retry was executed.

conditions

Type: Object
This field shows the current state of the PostgresBackup resource. For example:

Conditions:
    Last Transition Time:  2023-08-22T19:15:17Z
    Message:               Backup [sample-backup-full] is already running. This backup will be ignored.
    Reason:                HigherPriorityBackupInProgress
    Status:                False
    Type:                  BackupComplete
check-circle-line exclamation-circle-line close-line
Scroll to top icon