我安装了一个patroni主节点,需要创建一个pgbackback副本主节点状态为正在运行,但当我尝试手动运行恢复命令时,从节点停止,然后它消失,因为它看起来属于另一个数据库标识符pgbackback--stanza=main --log-level-console=info --delta restore从节点状态更改为正在运行
这里是主postgresql.yml文件:
> scope: {{ obasicat }} namespace: /pg_cluster/ name: {{ master }}
>
> restapi:
> listen: {{ master_ip }}:8008
> connect_address: {{ master_ip }}:8008
>
> etcd:
> host: {{ etcd_ip }}:2379
>
> bootstrap: dcs:
> ttl: 30
> loop_wait: 10
> retry_timeout: 10
> maximum_lag_on_failover: {{ lag }}
> postgresql:
> use_pg_rewind: false
> use_slots: true
>
> method: pgbackrest pgbackrest:
> command: /home/osadmin/custom_bootstrap.sh
> keep_existing_recovery_conf: False
> no_params: False
> recovery_conf:
> recovery_target: immediate
> recovery_target_action: pause
> restore_command: pgbackrest --stanza={{ obasicat }} archive-get %f %p
>
> pg_hba:
> - host all postgres 0.0.0.0/0 trust
> - host replication replicate {{ master_ip }}/0 md5
> - host replication replicate {{ slave_ip }}/0 md5
> - host all all 0.0.0.0/0 md5
>
> users:
> admin:
> password: admin
> options:
> - createrole
> - createdb
>
> postgresql: listen: "*:5432" connect_address: {{ master_ip }}:5432
> data_dir: /{{opgbase}}/{{opgname}}/data/ bin_dir:
> /opt/pgsql/na/11.7/bin/ authentication:
> replication:
> username: replicate
> password: replicate
> superuser:
> username: postgres
> password: postgres
>
> create_replica_methods:
> - pgbackrest pgbackrest:
> command: pgbackrest --stanza={{ obasicat }} --delta restore --config=/etc/pgbackrest.conf --pg1-path=/pgqdata/pgserver01/data/ --log-level-console=info
> keep_data: True
> no_params: True
>
> tags:
> nofailover: false
> noloadbalance: false
> clonefrom: false
> nosync: false
>
> log:
> level: DEBUG
> dir: /tmp/
这是从postgresql.yml文件:
> scope: {{ obasicat }} namespace: /pg_cluster/ name: {{ slave }}
>
> restapi:
> listen: {{ slave_ip }}:8008
> connect_address: {{ slave_ip }}:8008
>
> etcd:
> host: {{ etcd_ip }}:2379
>
> bootstrap: dcs:
> ttl: 30
> loop_wait: 10
> retry_timeout: 10
> maximum_lag_on_failover: {{ lag }}
> postgresql:
> use_pg_rewind: false
> use_slots: true
>
> method: pgbackrest pgbackrest:
> command: /home/osadmin/custom_bootstrap.sh
> keep_existing_recovery_conf: False
> no_params: False
> recovery_conf:
> recovery_target: immediate
> recovery_target_action: pause
> restore_command: pgbackrest --stanza={{ obasicat }} archive-get %f %p
>
> pg_hba:
> - host all postgres 0.0.0.0/0 trust
> - host replication replicate {{ master_ip }}/0 md5
> - host replication replicate {{ slave_ip }}/0 md5
> - host all all 0.0.0.0/0 md5
>
> users:
> admin:
> password: admin
> options:
> - createrole
> - createdb
>
> postgresql: listen: "*:5432" connect_address: {{ slave_ip }}:5432
> data_dir: /{{opgbase}}/{{opgname}}/data/ bin_dir:
> /opt/pgsql/na/11.7/bin/ authentication:
> replication:
> username: replicate
> password: replicate
> superuser:
> username: postgres
> password: postgres
>
> create_replica_methods:
> - pgbackrest pgbackrest:
> command: pgbackrest --stanza={{ obasicat }} --delta restore --config=/etc/pgbackrest_slave.conf --pg1-path=/pgqdata/pgserver01/data/ --log-level-console=info
> keep_data: True
> no_params: True
>
> tags:
> nofailover: false
> noloadbalance: false
> clonefrom: false
> nosync: false
>
> log:
> level: DEBUG
> dir: /tmp/
有没有人帮忙?!谢谢
1条答案
按热度按时间qoefvg9y1#
尝试在etcd/zookeper/consul中更新密钥
7127773868874685913!= 7194568630546240772
获取此密钥7127773868874685913
更新为新密钥7194568630546240772