我管理3个PostgreSQL集群,每个集群由一个领导人节点和两个副本组成。我必须使用PgBackRest来管理这些备份。PgBackRest运行在自己的节点上。然而,阅读文档,似乎存在节的概念来管理多个集群备份。这里有一个典型的conf文件:
[mydb1]
pg1-host=10.2.10.1
pg1-port=5432
pg1-path=/<my path>
pg1-host-user=postgres
pg1-socket-path=/tmp
pg2-host=10.2.10.2
pg2-port=5432
pg2-path=/<my path>
pg2-host-user=postgres
pg2-socket-path=/tmp
pg3-host=10.2.10.3
pg3-port=5432
pg3-path=/<my path>
pg3-host-user=postgres
pg3-socket-path=/tmp现在,我想在配置文件中添加另外两个集群:
[mydb2]
...
[mydb3]
...但是我想将它们的备份添加到不同的S3桶中(所以没有相同的桶和不同的节,而是不同的桶和不同的节)。,这有可能吗?
我注意到在pgbackrest.conf中,典型的全局配置如下所示:
[global]
log-level-file=detail
process-max=4
backup-standby=y
start-fast=y
repo1-cipher-pass=XXXXXXXXXX
repo1-cipher-type=aes-256-cbc
repo1-retention-full=120
repo1-retention-diff=72
repo1-path=/repo
repo1-s3-bucket=db-bucket-mydb1
repo1-s3-endpoint=s3....
repo1-s3-key=***************
repo1-s3-key-secret=*********************
repo1-s3-region=<my region>
repo1-type=s3可以只定义一个S3 IP和一个S3桶。我试图添加repo2-xxxx和repo3-xxxx,但没有成功。有没有人知道是否有办法将这三个备份存储在三个不同的S3桶中?如果是这样的话,是怎么做的?
发布于 2022-02-15 13:01:30
将repo配置键从全局移动到pgbackrest配置文件的节:
[mydb2]
pg1-host=10.2.10.1
pg1-port=5432
pg1-path=/<my path>
pg1-host-user=postgres
pg1-socket-path=/tmp
repo1-cipher-pass=XXXXXXXXXX
repo1-cipher-type=aes-256-cbc
repo1-retention-full=120
repo1-retention-diff=72
repo1-path=/repo
repo1-s3-bucket=db-bucket-mydb2
repo1-s3-endpoint=s3....
repo1-s3-key=***************
repo1-s3-key-secret=*********************
repo1-s3-region=<my region>
repo1-type=s3
[mydb3]
pg1-host=10.2.10.1
pg1-port=5432
pg1-path=/<my path>
pg1-host-user=postgres
pg1-socket-path=/tmp
repo1-cipher-pass=XXXXXXXXXX
repo1-cipher-type=aes-256-cbc
repo1-retention-full=120
repo1-retention-diff=72
repo1-path=/repo
repo1-s3-bucket=db-bucket-mydb3
repo1-s3-endpoint=s3....
repo1-s3-key=***************
repo1-s3-key-secret=*********************
repo1-s3-region=<my region>
repo1-type=s3因此,可以通过这种方式定义不同的存储桶,defined mydb3 2和db-bucket-mydb3 3。
同样的情况也适用于本地存储库。如果需要,可以使用完全不同的本地路径。
https://stackoverflow.com/questions/66659364
复制相似问题