简体   繁体   English

archive_command 配置 POSTGRESQL 10.4

[英]archive_command configuration POSTGRESQL 10.4

Currently I have the following configuration for use archive_command in postgresql目前我在 postgresql 中使用archive_command有以下配置

postgres=# show archive_command;  
archive_command  
---------------------------------------------------------------- 
rsync -a %p barman@barman:/backup/primary_postgres/incoming/%f` 

In my Barman server I can see the WAL files but I want to know why this files are erased, I was waiting to have all the WAL files and then manually errase the WAL files for been able to recover in time (PITR) but I can see that the files are erased after some minutes在我的 Barman 服务器中,我可以看到 WAL 文件,但我想知道为什么会删除这些文件,我正在等待拥有所有 WAL 文件,然后手动删除 WAL 文件以便能够及时恢复(PITR),但我可以看到文件在几分钟后被删除

[root@barman incoming]# pwd
/backup/primary_postgres/incoming
[root@barman incoming]# ls -ltr
total 147456
-rw-------. 1 barman barman 16777216 Nov 20 11:56 0000000100000759000000F7
-rw-------. 1 barman barman 16777216 Nov 20 11:56 0000000100000759000000F8
-rw-------. 1 barman barman 16777216 Nov 20 11:56 0000000100000759000000F9
-rw-------. 1 barman barman 16777216 Nov 20 11:56 0000000100000759000000FA
-rw-------. 1 barman barman 16777216 Nov 20 11:56 0000000100000759000000FB
-rw-------. 1 barman barman 16777216 Nov 20 11:56 0000000100000759000000FC
-rw-------. 1 barman barman 16777216 Nov 20 11:56 0000000100000759000000FD
-rw-------. 1 barman barman 16777216 Nov 20 11:56 0000000100000759000000FE
-rw-------. 1 barman barman 16777216 Nov 20 11:56 0000000100000759000000FF
[root@barman incoming]# ls -ltr
total 98304
-rw-------. 1 barman barman 16777216 Nov 20 11:56 0000000100000759000000FB
-rw-------. 1 barman barman 16777216 Nov 20 11:56 0000000100000759000000FC
-rw-------. 1 barman barman 16777216 Nov 20 11:56 0000000100000759000000FD
-rw-------. 1 barman barman 16777216 Nov 20 11:56 0000000100000759000000FE
-rw-------. 1 barman barman 16777216 Nov 20 11:56 0000000100000759000000FF
-rw-------. 1 barman barman 16777216 Nov 20 11:57 000000010000075A00000000

Do you know why this behavior and how I can be able to keep more historical WAL files?您知道为什么会出现这种行为以及我如何能够保留更多的历史 WAL 文件吗?

Regards问候

This is what "barman" does.这就是“酒保”所做的。 Incoming WAL are put in "incoming".传入的 WAL 被放入“传入”中。 Then barman validates and catalogs them and moves them from "incoming" to "wals".然后酒保对它们进行验证和分类,并将它们从“传入”移动到“wals”。

Why are you sticking your nose into barman's business like this?你为什么要这样插手酒保的生意? If you want your archive to be outside of barman's control, then don't put it under barman's control.如果您希望您的档案不受酒保的控制,请不要将其置于酒保的控制之下。 Having your own home-grown tools and "barman" both trying to manage your system at the same time will end in disaster.拥有自己的本土工具和“酒保”都试图同时管理您的系统将以灾难告终。 Decide if you want to use barman, or not use barman.决定是否要使用酒保,或不使用酒保。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM