我已经通过 rsync/SSH 与 WAL 流(如酒保文档中提到的场景 2b)架构与单个 PostgreSQL 和 Barman 设置了备份。
我试图了解 PITR 如何与 barmanrecover
命令一起工作。如果--target-time
在发出恢复命令时指定当前时间,预期的行为是什么。从备份时间到当前时间,它会恢复到酒保上次收到的任何 WAL 吗?
谢谢
对于可能有相同问题的其他人(鉴于文档对此不清楚),我找到了答案,并且正如我所料。
是的,从备份时间到当前时间,它确实恢复到酒保上次收到的任何 WAL。
请参阅下面的控制台片段以供参考,
barman@4b412c1875cd:~$ date
Sat Aug 8 02:47:13 UTC 2020
barman@4b412c1875cd:~$ barman recover --target-time "2020-08-08 02:31:00+00:00" postgres-source-db 20200801T030001 /var/log/barman/TESTRESTOREFORTEST
Starting local restore for server postgres-source-db using backup 20200801T030001
Destination directory: /var/log/barman/TESTRESTOREFORTEST
Doing PITR. Recovery target time: '2020-08-08 02:31:00+00:00'
Copying the base backup.
Copying required WAL segments.
Generating recovery configuration
Identify dangerous settings in destination directory.
Recovery completed (start time: 2020-08-08 02:50:46.538480, elapsed time: 1 second)
Your PostgreSQL server has been successfully prepared for recovery!
barman@4b412c1875cd:~$
谢谢
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句