2017-03-04 106 views
1

我正在嘗試配置Barman進行備份。當我做一個barman check replica我不斷收到:WAL存檔:失敗(請確保WAL運輸已設置)

Server replica: 
WAL archive: FAILED (please make sure WAL shipping is setup) 
PostgreSQL: OK 
superuser: OK 
wal_level: OK 
directories: OK 
retention policy settings: OK 
backup maximum age: FAILED (interval provided: 1 day, latest backup age: No available backups) 
compression settings: OK 
failed backups: OK (there are 0 failed backups) 
minimum redundancy requirements: FAILED (have 0 backups, expected at least 2) 
ssh: OK (PostgreSQL server) 
not in recovery: FAILED (cannot perform exclusive backup on a standby) 
archive_mode: OK 
archive_command: OK 
continuous archiving: OK 
archiver errors: OK 

我使用PostgreSQL 9.6和2.1酒保;我不確定這個問題有人可以幫忙嗎? 這裏是我的酒保服務器配置:

description = "Database backup" 
conninfo = host=<db-ip> user=postgres dbname=db 
backup_method = rsync 
ssh_command = ssh [email protected]<db-ip> 
archiver = on 

回答

5

barman check試圖確認存檔被斷言,實際上有什麼東西在檔案中正確設置。但是,WAL段通常只會在填滿後才存檔,如果您的服務器空閒,這種情況永遠不會發生。

要解決此問題,巴曼提供了一個命令來強制分段開關,等待完成的WAL展現出來,然後立即將其歸檔:

barman switch-xlog --force --archive replica