全,
我试图执行一个PITR恢复使用酒吧使用恢复命令。问题是,一旦完成酒保恢复,服务器就会保持只读状态。在完成PITR之后,目标服务器是否可以单独作为读-写服务器出现?根据酒保的文件,我希望--目标--行动‘推广’可能会奏效,但这没有帮助。
我在postgres版本10.12上使用了barman 2.10。
下面是我用来执行PITR的命令:
barman@abc-barman01:~ $ barman recover --target-time '05/13/2020 14:00:00' --target-action 'promote' --remote-ssh-command "ssh postgres@abc-pg03" abc-pg01 20200512T203002 /var/lib/pgsql/10/data
Starting remote restore for server abc-pg01 using backup 20200512T203002
Destination directory: /var/lib/pgsql/10/data
Remote command: ssh postgres@abc-pg03
Doing PITR. Recovery target time: '2020-05-13 14:00:00-04:00'
Using safe horizon time for smart rsync copy: 2020-04-04 09:27:29.180929-04:00
Copying the base backup.
Copying required WAL segments.
Generating recovery configuration
Identify dangerous settings in destination directory.
IMPORTANT
These settings have been modified to prevent data losses
postgresql.conf line 219: archive_command = false
WARNING
You are required to review the following options as potentially dangerous
postgresql.conf line 83: ssl_cert_file = 'server.crt'
postgresql.conf line 84: ssl_key_file = 'server.key'
Recovery completed (start time: 2020-05-19 15:38:23.157146, elapsed time: 24 minutes, 21 seconds)
Your PostgreSQL server has been successfully prepared for recovery!
You have mail in /var/spool/mail/barman目前,一旦完成恢复,我就手动运行pg_wal_replay_resume(),以使服务器进入读-写模式。如果有人能调查这件事我会很感激的。
发布于 2020-05-27 07:24:27
从barman 2.4开始,有两个选项可用于恢复后行为。它们是--目标--操作选项,接受以下值:
Barman 2.4还为恢复命令添加了--备用模式选项,如果指定了该选项,则通过创建standby.signal正确地将恢复的实例配置为备用。
祝好运。
如果你喜欢答案,请投赞成票。WY
https://dba.stackexchange.com/questions/267490
复制相似问题