New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to backup and restore from gcp storage bucket (GCS) #1791
Comments
For direct support of GCS, the PostgreSQL Operator will need for pgBackRest to support GCS. Until then, I would recommend reviewing this comment about how GCS can be accomplished with MinIO today, substituting "Azure" with GCS for the supported gateway: |
Hello, I just tried to enable the backups in GCS using HMAC keys for service accounts as it should be S3 compatible but it would appear I just hit this issue where it's not fully supported. It appears that some small changes in PGO/pgBackRest would seamlessly enable this feature and I do use this approach elsewhere. To test it, I followed PGO's documentation but tweaked Cluster:
BackrestS3Endpoint: storage.googleapis.com
# disable TLS because the current cert is for AWS
BackrestS3VerifyTLS: false The error stanza logs is shown below. Just to be clear, this is an "error" on Google's API AFAIK...
|
Just FYI, the stanza logs indicates the issue at hand with GCS:
GCS is not fully compatible with S3 protocol. pgbackrest needs to be modified to support the storage endpoint and this feature is on pgbackest's backlog: https://github.com/pgbackrest/pgbackrest/projects/2#card-33945748 |
Similar problem for me. As a workaround, I've been experimenting with an implementation that uses a GCS CSI driver to mount a Cloud Storage bucket as a persistent volume: Mileage may vary, but it works well for me. |
pgBackRest 2.33 introduced support for GCS storage as a means for taking backups. PGO now adds orchestration for using GCS with its pgBackRest integration. This adds a few new attributes to the pgclusters.crunchydata.com custom resource to enable GCS support with PGO, including: - BackrestGCSBucket (required) - BackrestGCSEndpoint - BackrestGCSKeyType The pgBackRest repository Secret now supports a key called "gcs-key", which references the GCS credential. Similarly, additional flags are now available in the `pgo create cluster` command to enable GCS support, including: - `--pgbackrest-gcs-bucket` - `--pgbackrest-gcs-endpoint` - `--pgbackrest-gcs-key` - `--pgbackrest-gcs-key-type` Note that `--pgbackrest-gcs-key` references a file path in your local environment. The GCS credential is a JSON file; for convenience, the PGO client will accept the file and handle the upload. There are also several installation configuration parameters available if, for example, you are using the same bucket. The two parameters that are required are the GCS bucket name and the GCS key; pgBackRest can figure out the rest. This supports all of the same things that PGO supports around S3; you can even create standbys using GCS. However, note that in a "hybrid" setup, you can only use "posix,gcs"; "s3,gcs" is not supported at this time. In other words, the following storage types are supported: - posix - s3 - gcs - posix,s3 - posix,gcs Issue: [ch11177] Issue: CrunchyData#1791
pgBackRest 2.33 introduced support for GCS storage as a means for taking backups. PGO now adds orchestration for using GCS with its pgBackRest integration. This adds a few new attributes to the pgclusters.crunchydata.com custom resource to enable GCS support with PGO, including: - BackrestGCSBucket (required) - BackrestGCSEndpoint - BackrestGCSKeyType The pgBackRest repository Secret now supports a key called "gcs-key", which references the GCS credential. Similarly, additional flags are now available in the `pgo create cluster` command to enable GCS support, including: - `--pgbackrest-gcs-bucket` - `--pgbackrest-gcs-endpoint` - `--pgbackrest-gcs-key` - `--pgbackrest-gcs-key-type` Note that `--pgbackrest-gcs-key` references a file path in your local environment. The GCS credential is a JSON file; for convenience, the PGO client will accept the file and handle the upload. There are also several installation configuration parameters available if, for example, you are using the same bucket. The two parameters that are required are the GCS bucket name and the GCS key; pgBackRest can figure out the rest. This supports all of the same things that PGO supports around S3; you can even create standbys using GCS. However, note that in a "hybrid" setup, you can only use "posix,gcs"; "s3,gcs" is not supported at this time. In other words, the following storage types are supported: - posix - s3 - gcs - posix,s3 - posix,gcs Issue: [ch11177] Issue: CrunchyData#1791
pgBackRest 2.33 introduced support for GCS storage as a means for taking backups. PGO now adds orchestration for using GCS with its pgBackRest integration. This adds a few new attributes to the pgclusters.crunchydata.com custom resource to enable GCS support with PGO, including: - BackrestGCSBucket (required) - BackrestGCSEndpoint - BackrestGCSKeyType The pgBackRest repository Secret now supports a key called "gcs-key", which references the GCS credential. Similarly, additional flags are now available in the `pgo create cluster` command to enable GCS support, including: - `--pgbackrest-gcs-bucket` - `--pgbackrest-gcs-endpoint` - `--pgbackrest-gcs-key` - `--pgbackrest-gcs-key-type` Note that `--pgbackrest-gcs-key` references a file path in your local environment. The GCS credential is a JSON file; for convenience, the PGO client will accept the file and handle the upload. There are also several installation configuration parameters available if, for example, you are using the same bucket. The two parameters that are required are the GCS bucket name and the GCS key; pgBackRest can figure out the rest. This supports all of the same things that PGO supports around S3; you can even create standbys using GCS. However, note that in a "hybrid" setup, you can only use "posix,gcs"; "s3,gcs" is not supported at this time. In other words, the following storage types are supported: - posix - s3 - gcs - posix,s3 - posix,gcs Issue: [ch11177] Issue: CrunchyData#1791
pgBackRest 2.33 introduced support for GCS storage as a means for taking backups. PGO now adds orchestration for using GCS with its pgBackRest integration. This adds a few new attributes to the pgclusters.crunchydata.com custom resource to enable GCS support with PGO, including: - BackrestGCSBucket (required) - BackrestGCSEndpoint - BackrestGCSKeyType The pgBackRest repository Secret now supports a key called "gcs-key", which references the GCS credential. Similarly, additional flags are now available in the `pgo create cluster` command to enable GCS support, including: - `--pgbackrest-gcs-bucket` - `--pgbackrest-gcs-endpoint` - `--pgbackrest-gcs-key` - `--pgbackrest-gcs-key-type` Note that `--pgbackrest-gcs-key` references a file path in your local environment. The GCS credential is a JSON file; for convenience, the PGO client will accept the file and handle the upload. There are also several installation configuration parameters available if, for example, you are using the same bucket. The two parameters that are required are the GCS bucket name and the GCS key; pgBackRest can figure out the rest. This supports all of the same things that PGO supports around S3; you can even create standbys using GCS. However, note that in a "hybrid" setup, you can only use "posix,gcs"; "s3,gcs" is not supported at this time. In other words, the following storage types are supported: - posix - s3 - gcs - posix,s3 - posix,gcs Issue: [ch11177] Issue: CrunchyData#1791
pgBackRest 2.33 introduced support for GCS storage as a means for taking backups. PGO now adds orchestration for using GCS with its pgBackRest integration. This adds a few new attributes to the pgclusters.crunchydata.com custom resource to enable GCS support with PGO, including: - BackrestGCSBucket (required) - BackrestGCSEndpoint - BackrestGCSKeyType The pgBackRest repository Secret now supports a key called "gcs-key", which references the GCS credential. Similarly, additional flags are now available in the `pgo create cluster` command to enable GCS support, including: - `--pgbackrest-gcs-bucket` - `--pgbackrest-gcs-endpoint` - `--pgbackrest-gcs-key` - `--pgbackrest-gcs-key-type` Note that `--pgbackrest-gcs-key` references a file path in your local environment. The GCS credential is a JSON file; for convenience, the PGO client will accept the file and handle the upload. There are also several installation configuration parameters available if, for example, you are using the same bucket. The two parameters that are required are the GCS bucket name and the GCS key; pgBackRest can figure out the rest. This supports all of the same things that PGO supports around S3; you can even create standbys using GCS. However, note that in a "hybrid" setup, you can only use "posix,gcs"; "s3,gcs" is not supported at this time. In other words, the following storage types are supported: - posix - s3 - gcs - posix,s3 - posix,gcs Issue: [ch11177] Issue: CrunchyData#1791
pgBackRest 2.33 introduced support for GCS storage as a means for taking backups. PGO now adds orchestration for using GCS with its pgBackRest integration. This adds a few new attributes to the pgclusters.crunchydata.com custom resource to enable GCS support with PGO, including: - BackrestGCSBucket (required) - BackrestGCSEndpoint - BackrestGCSKeyType The pgBackRest repository Secret now supports a key called "gcs-key", which references the GCS credential. Similarly, additional flags are now available in the `pgo create cluster` command to enable GCS support, including: - `--pgbackrest-gcs-bucket` - `--pgbackrest-gcs-endpoint` - `--pgbackrest-gcs-key` - `--pgbackrest-gcs-key-type` Note that `--pgbackrest-gcs-key` references a file path in your local environment. The GCS credential is a JSON file; for convenience, the PGO client will accept the file and handle the upload. There are also several installation configuration parameters available if, for example, you are using the same bucket. The two parameters that are required are the GCS bucket name and the GCS key; pgBackRest can figure out the rest. This supports all of the same things that PGO supports around S3; you can even create standbys using GCS. However, note that in a "hybrid" setup, you can only use "posix,gcs"; "s3,gcs" is not supported at this time. In other words, the following storage types are supported: - posix - s3 - gcs - posix,s3 - posix,gcs Issue: [ch11177] Issue: CrunchyData#1791
pgBackRest 2.33 introduced support for GCS storage as a means for taking backups. PGO now adds orchestration for using GCS with its pgBackRest integration. This adds a few new attributes to the pgclusters.crunchydata.com custom resource to enable GCS support with PGO, including: - BackrestGCSBucket (required) - BackrestGCSEndpoint - BackrestGCSKeyType The pgBackRest repository Secret now supports a key called "gcs-key", which references the GCS credential. Similarly, additional flags are now available in the `pgo create cluster` command to enable GCS support, including: - `--pgbackrest-gcs-bucket` - `--pgbackrest-gcs-endpoint` - `--pgbackrest-gcs-key` - `--pgbackrest-gcs-key-type` Note that `--pgbackrest-gcs-key` references a file path in your local environment. The GCS credential is a JSON file; for convenience, the PGO client will accept the file and handle the upload. There are also several installation configuration parameters available if, for example, you are using the same bucket. The two parameters that are required are the GCS bucket name and the GCS key; pgBackRest can figure out the rest. This supports all of the same things that PGO supports around S3; you can even create standbys using GCS. However, note that in a "hybrid" setup, you can only use "posix,gcs"; "s3,gcs" is not supported at this time. In other words, the following storage types are supported: - posix - s3 - gcs - posix,s3 - posix,gcs Issue: [ch11177] Issue: #1791
Direct support for GCS will be available with the 4.7.0 release. |
@jkatz Is there any ETA on 4.7.0? I would like to play around with the GCS so am thinking if I should wait for the official release or play with master for now. Thank you |
**What is the motivation or use case for the change? **
I do not see an option using the crunchydata operator to backup and restore from GCP storage bucket.
Describe the solution you'd like
I would to see an option while using the postgres-operator to backup and restore from GCP storage bucket.
Please tell us about your environment:
Additional context
Add any other context or screenshots about the enhancement request here.
The text was updated successfully, but these errors were encountered: