PostgresRestore Synopsis

apiVersion: sql.tanzu.vmware.com/v1
kind: PostgresRestore
metadata:
  name: restore-sample
spec:
  sourceBackup:
    name: backup-sample
  targetInstance:
    name: postgres-sample
  #pointInTime: 

The list below explains the properties that can be set for the PostgresRestore resource.

Metadata

name

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

Spec

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

sourceBackup

Type: Object
Required
Default: n/a

  • name
    Type: String
    Required
    Default: n/a
    The name of the PostgresBackup that represents the backup artifact to restore.
    Must be in the same namespace as the PostgresRestore.
    Example
    backup-sample

targetInstance

Type: Object
Required
Default: n/a

  • name
    Type: String
    Required
    Default: n/a
    The name of the target instance where the sourceBackup should be restored.
    In case of in-place restore, this should be the source instance where the sourceBackup was taken
    Example
    my-target-instance

pointInTime

Type: string
Optional
Default: n/a
The point in time (PIT) selected to restore to. The provided time needs to be after the completed time of the referenced backup in the sourceBackup field. See Restore Time Criteria in Perform a PIT restore.
Example
2022-05-26T18:30:00-04:00

Status

The status fields show the observed status of the PostgresRestore object and the values are updated by the controller that handles Backup/Restore in the instance.

phase

Type: string
This field shows the current state of a PostgresRestore CR. It can be either empty or have any of the following values: Running, RecreatingNodes, RecreatingPrimary, RecreatingSecondary, WaitForPrimary, Finalizing, Succeeded, or Failed. All these phases are related to some internal processing that the operator does to achieve a restore. The terminal phasees are Failed or Succeeded.

timeStarted

Type: time
This field denotes the time when the restore started

timeCompleted

Type: time
This field indicates the time when the restore got completed. This field is populated once the PostgresRestore CR reaches Failed or Succeeded state.

Message

Type: time
This field shows some error/useful messages for why a restore is stuck or pending. Example:
Instance postgres-sample does not specify spec.backupLocation.name

check-circle-line exclamation-circle-line close-line
Scroll to top icon