Backup
postgresql.cnpg.io / v1
apiVersion: postgresql.cnpg.io/v1
kind: Backup
metadata:
name: example
apiVersion
string
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
kind
string
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata
object required
spec object required
Specification of the desired behavior of the backup.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
cluster object required
The cluster to backup
name
string required
Name of the referent.
method
string
The backup method to be used, possible options are `barmanObjectStore`,
`volumeSnapshot` or `plugin`. Defaults to: `barmanObjectStore`.
enum:
barmanObjectStore, volumeSnapshot, plugin
online
boolean
Whether the default type of backup with volume snapshots is
online/hot (`true`, default) or offline/cold (`false`)
Overrides the default setting specified in the cluster field '.spec.backup.volumeSnapshot.online'
onlineConfiguration object
Configuration parameters to control the online/hot backup with volume snapshots
Overrides the default settings specified in the cluster '.backup.volumeSnapshot.onlineConfiguration' stanza
immediateCheckpoint
boolean
Control whether the I/O workload for the backup initial checkpoint will
be limited, according to the `checkpoint_completion_target` setting on
the PostgreSQL server. If set to true, an immediate checkpoint will be
used, meaning PostgreSQL will complete the checkpoint as soon as
possible. `false` by default.
waitForArchive
boolean
If false, the function will return immediately after the backup is completed,
without waiting for WAL to be archived.
This behavior is only useful with backup software that independently monitors WAL archiving.
Otherwise, WAL required to make the backup consistent might be missing and make the backup useless.
By default, or when this parameter is true, pg_backup_stop will wait for WAL to be archived when archiving is
enabled.
On a standby, this means that it will wait only when archive_mode = always.
If write activity on the primary is low, it may be useful to run pg_switch_wal on the primary in order to trigger
an immediate segment switch.
pluginConfiguration object
Configuration parameters passed to the plugin managing this backup
name
string required
Name is the name of the plugin managing this backup
parameters
object
Parameters are the configuration parameters passed to the backup
plugin for this backup
target
string
The policy to decide which instance should perform this backup. If empty,
it defaults to `cluster.spec.backup.target`.
Available options are empty string, `primary` and `prefer-standby`.
`primary` to have backups run always on primary instances,
`prefer-standby` to have backups run preferably on the most updated
standby, if available.
enum:
primary, prefer-standbystatus object
Most recently observed status of the backup. This data may not be up to
date. Populated by the system. Read-only.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
azureCredentials object
The credentials to use to upload data to Azure Blob Storage
connectionString object
The connection string to be used
key
string required
The key to select
name
string required
Name of the referent.
inheritFromAzureAD
boolean
Use the Azure AD based authentication without providing explicitly the keys.
storageAccount object
The storage account where to upload data
key
string required
The key to select
name
string required
Name of the referent.
storageKey object
The storage account key to be used in conjunction
with the storage account name
key
string required
The key to select
name
string required
Name of the referent.
storageSasToken object
A shared-access-signature to be used in conjunction with
the storage account name
key
string required
The key to select
name
string required
Name of the referent.
useDefaultAzureCredentials
boolean
Use the default Azure authentication flow, which includes DefaultAzureCredential.
This allows authentication using environment variables and managed identities.
backupId
string
The ID of the Barman backup
backupLabelFile
string
Backup label file content as returned by Postgres in case of online (hot) backups
format:
byte
backupName
string
The Name of the Barman backup
beginLSN
string
The starting xlog
beginWal
string
The starting WAL
commandError
string
The backup command output in case of error
commandOutput
string
Unused. Retained for compatibility with old versions.
destinationPath
string
The path where to store the backup (i.e. s3://bucket/path/to/folder)
this path, with different destination folders, will be used for WALs
and for data. This may not be populated in case of errors.
encryption
string
Encryption method required to S3 API
endLSN
string
The ending xlog
endWal
string
The ending WAL
endpointCA object
EndpointCA store the CA bundle of the barman endpoint.
Useful when using self-signed certificates to avoid
errors with certificate issuer and barman-cloud-wal-archive.
key
string required
The key to select
name
string required
Name of the referent.
endpointURL
string
Endpoint to be used to upload data to the cloud,
overriding the automatic endpoint discovery
error
string
The detected error
googleCredentials object
The credentials to use to upload data to Google Cloud Storage
applicationCredentials object
The secret containing the Google Cloud Storage JSON file with the credentials
key
string required
The key to select
name
string required
Name of the referent.
gkeEnvironment
boolean
If set to true, will presume that it's running inside a GKE environment,
default to false.
instanceID object
Information to identify the instance where the backup has been taken from
ContainerID
string
The container ID
podName
string
The pod name
sessionID
string
The instance manager session ID. This is a unique identifier generated at instance manager
startup and changes on every restart (including container reboots). Used to detect if
the instance manager was restarted during long-running operations like backups, which
would terminate any running backup process.
majorVersion
integer
The PostgreSQL major version that was running when the
backup was taken.
method
string
The backup method being used
online
boolean
Whether the backup was online/hot (`true`) or offline/cold (`false`)
phase
string
The last backup status
pluginMetadata
object
A map containing the plugin metadata
reconciliationStartedAt
string
When the backup process was started by the operator
format:
date-time
reconciliationTerminatedAt
string
When the reconciliation was terminated by the operator (either successfully or not)
format:
date-times3Credentials object
The credentials to use to upload data to S3
accessKeyId object
The reference to the access key id
key
string required
The key to select
name
string required
Name of the referent.
inheritFromIAMRole
boolean
Use the role based authentication without providing explicitly the keys.
region object
The reference to the secret containing the region name
key
string required
The key to select
name
string required
Name of the referent.
secretAccessKey object
The reference to the secret access key
key
string required
The key to select
name
string required
Name of the referent.
sessionToken object
The references to the session key
key
string required
The key to select
name
string required
Name of the referent.
serverName
string
The server name on S3, the cluster name is used if this
parameter is omitted
snapshotBackupStatus object
Status of the volumeSnapshot backup
elements []object
The elements list, populated with the gathered volume snapshots
name
string required
Name is the snapshot resource name
tablespaceName
string
TablespaceName is the name of the snapshotted tablespace. Only set
when type is PG_TABLESPACE
type
string required
Type is tho role of the snapshot in the cluster, such as PG_DATA, PG_WAL and PG_TABLESPACE
startedAt
string
When the backup execution was started by the backup tool
format:
date-time
stoppedAt
string
When the backup execution was terminated by the backup tool
format:
date-time
tablespaceMapFile
string
Tablespace map file content as returned by Postgres in case of online (hot) backups
format:
byteNo matches. Try .spec.cluster for an exact path