zalando / postgres-operator

Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
https://postgres-operator.readthedocs.io/
MIT License
4.35k stars 979 forks source link

Enable using create_replica_methods - basebackup for Standby Cluster #1133

Open asafo opened 4 years ago

asafo commented 4 years ago

Hello

It seems from the docs of the operator (https://postgres-operator.readthedocs.io/en/latest/user/#setting-up-a-standby-cluster) That there is no option to choose basebackup as create_replica_method. But it is possible from patroni docs (https://github.com/zalando/patroni/blob/master/docs/replica_bootstrap.rst#standby-cluster)

This would be really useful to enable smooth migrations from clutsers not hosted in AWS. BTW: Even if I try to use s3 compatible storage (e.g: minio), Still the operator is very AWS oriented. (no simple s3 path, but region,endpoint and bucket)

Jan-M commented 4 years ago

Maybe our docs need improvement:

This should work:

spec:
    # [...]
    clone:
        cluster: "acid-test-restore-source"
        uid: "<UID>"
        timestamp: "2019-04-26T10:46:57.000+00:00"
        s3_wal_path: "s3://<bucketname>/spilo-backups/<source_db_cluster>/<UID>/wal"