Backup configuration allow to specify when and how backups are performed. By default this is done at 5am UTC in a window of 1 hour, you may change this value in order to perform backups for another time zone and period of time. The backup configuration CR represent the backups configuration of the cluster.
Kind: SGBackupConfig
listKind: SGBackupConfigList
plural: sgbackupconfigs
singular: sgbackupconfig
Spec
Property | Required | Updatable | Type | Default | Description |
---|---|---|---|---|---|
baseBackups | ✓ | object |
Back backups configuration.
|
||
storage | ✓ | object |
Backup storage configuration.
|
Example:
apiVersion: stackgres.io/v1beta1
kind: SGBackupConfig
metadata:
name: backupconf
spec:
baseBackups:
retention: 5
cronSchedule: 0 5 * * *
compression: lz4
performance:
maxDiskBandwitdh: 26214400 #25 MB per seceod
maxNetworkBandwitdh: 52428800 #50 MB per second
uploadDiskConcurrency: 2
storage:
type: s3Compatible
s3Compatible:
bucket: stackgres
region: k8s
enablePathStyleAddressing: true
endpoint: http://my-cluster-minio:9000
awsCredentials:
secretKeySelectors:
accessKeyId:
key: accesskey
name: my-cluster-minio
secretAccessKey:
key: secretkey
name: my-cluster-minio
Property | Required | Updatable | Type | Default | Description |
---|---|---|---|---|---|
retention | ✓ | integer | 5 |
When an automatic retention policy is defined to delete old base backups, this parameter specifies the number of base backups to keep, in a sliding window. Consequently, the time range covered by backups is Default is 5. |
|
cronSchedule | ✓ | string | 05:00 UTC |
Continuous Archiving backups are composed of periodic base backups and all the WAL segments produced in between those base backups. This parameter specifies at what time and with what frequency to start performing a new base backup. Use cron syntax (
Also ranges of values ( If not set, full backups are performed each day at 05:00 UTC. |
|
compression | ✓ | string | lz4 |
Specifies the backup compression algorithm. Possible options are: lz4, lzma, brotli. The default method is
lz4 . LZ4 is the fastest method, but compression ratio is the worst. LZMA is way slower, but it compresses backups about 6 times better than LZ4. Brotli is a good trade-off between speed and compression ratio, being about 3 times better than LZ4. |
|
performance | ✓ | object |
Property | Required | Updatable | Type | Default | Description |
---|---|---|---|---|---|
maxDiskBandwitdh | ✓ | integer | unlimited |
Maximum disk read I/O when performing a backup. In bytes (per second).
|
|
maxNetworkBandwitdh | ✓ | integer | unlimited |
Maximum storage upload bandwidth used when storing a backup. In bytes (per second).
|
|
uploadDiskConcurrency | ✓ | integer | 1 |
Backup storage may use several concurrent streams to store the data. This parameter configures the number of parallel streams to use. By default, it’s set to 1 (use one stream).
|
Property | Required | Updatable | Type | Default | Description |
---|---|---|---|---|---|
type | ✓ | ✓ | string |
Determine the type of object storage used for storing the base backups and WAL segments. Possible values:
|
|
s3 | if type = s3 | ✓ | object |
Amazon Web Services S3 configuration.
|
|
s3Compatible | if type = s3Compatible | ✓ | object |
AWS S3-Compatible API configuration
|
|
gcs | if type = gcs | ✓ | object |
Google Cloud Storage configuration.
|
|
azureBlob | if type = azureblob | ✓ | object |
Azure Blob Storage configuration.
|
Property | Required | Updatable | Type | Default | Description |
---|---|---|---|---|---|
bucket | ✓ | ✓ | string |
AWS S3 bucket name.
|
|
path | ✓ | string |
Optional path within the S3 bucket. Note that StackGres generates in any case a folder per StackGres cluster, using the
SGCluster.metadata.name . |
||
awsCredentials | ✓ | ✓ | object |
The credentials to access AWS S3 for writing and reading.
|
|
region | ✓ | string |
The AWS S3 region. The Region may be detected using s3:GetBucketLocation, but if you wish to avoid giving permissions to this API call or forbid it from the applicable IAM policy, you must then specify this property.
|
||
storageClass | ✓ | string |
The Amazon S3 Storage Class to use for the backup object storage. By default, the
STANDARD storage class is used. Other supported values include STANDARD_IA for Infrequent Access and REDUCED_REDUNDANCY . |
Property | Required | Updatable | Type | Default | Description |
---|---|---|---|---|---|
bucket | ✓ | ✓ | string |
Bucket name.
|
|
path | ✓ | string |
Optional path within the S3 bucket. Note that StackGres generates in any case a folder per StackGres cluster, using the
SGCluster.metadata.name . |
||
awsCredentials | ✓ | ✓ | object |
The credentials to access AWS S3 for writing and reading.
|
|
region | ✓ | string |
The AWS S3 region. The Region may be detected using s3:GetBucketLocation, but if you wish to avoid giving permissions to this API call or forbid it from the applicable IAM policy, you must then specify this property.
|
||
storageClass | ✓ | string |
The Amazon S3 Storage Class to use for the backup object storage. By default, the
STANDARD storage class is used. Other supported values include STANDARD_IA for Infrequent Access and REDUCED_REDUNDANCY . |
||
endpoint | ✓ | string |
Overrides the default url to connect to an S3-compatible service.
For example:
http://s3-like-service:9000 . |
||
enablePathStyleAddressing | ✓ | boolean |
Enable path-style addressing (i.e. Defaults to false. |
Property | Required | Updatable | Type | Default | Description |
---|---|---|---|---|---|
secretKeySelectors | ✓ | ✓ | object |
Kubernetes SecretKeySelector(s) to reference the Secret(s) that contain the information about the
awsCredentials . Note that you may use the same or different Secrets for the accessKeyId and the secretAccessKey . In the former case, the keys that identify each must be, obviously, different. |
Property | Required | Updatable | Type | Default | Description |
---|---|---|---|---|---|
accessKeyId | ✓ | ✓ | object |
AWS access key ID. For example,
AKIAIOSFODNN7EXAMPLE . |
|
secretAccessKey | ✓ | ✓ | object |
AWS secret access key. For example,
wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY . |
Property | Required | Updatable | Type | Default | Description |
---|---|---|---|---|---|
bucket | ✓ | ✓ | string |
GCS bucket name.
|
|
path | ✓ | string |
Optional path within the GCS bucket. Note that StackGres generates in any case a folder per StackGres cluster, using the
SGCluster.metadata.name . |
||
gcpCredentials | ✓ | ✓ | object |
The credentials to access GCS for writing and reading.
|
Property | Required | Updatable | Type | Default | Description |
---|---|---|---|---|---|
secretKeySelectors | ✓ | ✓ | object |
A Kubernetes SecretKeySelector to reference the Secrets that contain the information about the Service Account to access GCS.
|
Property | Required | Updatable | Type | Default | Description |
---|---|---|---|---|---|
serviceAccountJSON | ✓ | ✓ | object |
A service account key from GCP. In JSON format, as downloaded from the GCP Console.
|
Property | Required | Updatable | Type | Default | Description |
---|---|---|---|---|---|
bucket | ✓ | ✓ | string |
Azure Blob Storage bucket name.
|
|
path | ✓ | string |
Optional path within the Azure Blob bucket. Note that StackGres generates in any case a folder per StackGres cluster, using the
SGCluster.metadata.name . |
||
azureCredentials | ✓ | ✓ | object |
The credentials to access Azure Blob Storage for writing and reading.
|
Property | Required | Updatable | Type | Default | Description |
---|---|---|---|---|---|
secretKeySelectors | ✓ | ✓ | object |
Kubernetes SecretKeySelector(s) to reference the Secret(s) that contain the information about the
azureCredentials . . Note that you may use the same or different Secrets for the storageAccount and the accessKey . In the former case, the keys that identify each must be, obviously, different. |
Property | Required | Updatable | Type | Default | Description |
---|---|---|---|---|---|
storageAccount | ✓ | ✓ | object |
The Storage Account that contains the Blob bucket to be used.
|
|
accessKey | ✓ | ✓ | object |