postgresql Barman恢复需要很长时间

ykejflvf  于 2023-01-17  发布在  PostgreSQL
关注(0)|答案(1)|浏览(124)

我有一个带有Barman设置的Postgres群集
与Barman备份1.4TB我恢复到另一个服务器。我有DB大小为1.5TB和WAL文件大小为18 GB。
使用以下命令恢复到另一台服务器

barman recover --remote-ssh-command "ssh postgres@newserverip" main-db-server backup-id /location

仍然是它showing copying required wal files.
有没有人帮忙
从2天仍然在运行恢复过程
现在,/location大小为1.7TB,WAL文件大小为250 GB。

ego6inou

ego6inou1#

我建议你在你的恢复命令中添加--target-time变量,你可以运行barman show-backup main-db-server latest来获得最新备份的细节,并使用begin_time来代替target-time

barman recover --target-time "Begin time" --remote-ssh-command "ssh postgres@newserverip" main-db-server backup-id /location

另一方面,从Barman 2.3中,您可以使用--target-immediate选项(仅适用于PostgreSQL 9.4及更高版本)在达到一致性时退出恢复(即基本备份过程结束)。

barman recover -- target-immediate --remote-ssh-command "ssh postgres@newserverip" main-db-server backup-id /location

相关问题