wal-g: Support alternate S3 storage classes.

This commit is contained in:
Alex Vandiver 2023-07-19 00:27:04 +00:00 committed by Tim Abbott
parent 52eacd30c5
commit 5a26237b54
2 changed files with 18 additions and 0 deletions

View File

@ -908,6 +908,19 @@ may wish to increase this if you are taking backups on a replica, so can afford
to affect other disk I/O, and have an SSD which is good at parallel random to affect other disk I/O, and have an SSD which is good at parallel random
reads. reads.
#### `backups_storage_class`
What [storage class](https://aws.amazon.com/s3/storage-classes/) to use when
uploading database backups. Defaults to `STANDARD`, meaning "[S3
standard][s3-standard]", but many deployments will have overall lower costs if
"[S3 Standard - Infrequent Access][s3-ia]" is used, via the `STANDARD_IA`
value. Also supported is "[S3 Reduced Redundancy][s3-rr]", by setting
`REDUCED_REDUNDANCY`, but this is not suggested for production use.
[s3-standard]: https://aws.amazon.com/s3/storage-classes/#General_purpose
[s3-ia]: https://aws.amazon.com/s3/storage-classes/#Infrequent_access
[s3-rr]: https://aws.amazon.com/s3/reduced-redundancy/
#### `missing_dictionaries` #### `missing_dictionaries`
If set to a true value during initial database creation, uses PostgreSQL's If set to a true value during initial database creation, uses PostgreSQL's

View File

@ -22,4 +22,9 @@ if ! s3_backups_bucket=$(crudini --get "$ZULIP_SECRETS_CONF" secrets s3_backups_
exit 1 exit 1
fi fi
export WALG_S3_PREFIX="s3://$s3_backups_bucket" export WALG_S3_PREFIX="s3://$s3_backups_bucket"
if storage_class=$(crudini --get /etc/zulip/zulip.conf postgresql backups_storage_class 2>&1); then
export WALG_S3_STORAGE_CLASS="$storage_class"
fi
exec /usr/local/bin/wal-g "$@" exec /usr/local/bin/wal-g "$@"