node2 修改 postgresql.conf
postgres@nodex:~$ vi /etc/postgresql/9.6/main/postgresql.confarchive_command = 'gzip < %p > /data/backup/pgwalarchive/%f.gz && rsync -a %p barman@192.168.56.101:/var/lib/barman/dn1_ssh/incoming/%f'
1
2
3
4
node1 查看定义的 server_name
barman@nodex:~$ barman show-server all
1
barman@nodex:~$ barman check dn1_sshServer dn1_ssh: PostgreSQL: OK is_superuser: OK wal_level: OK directories: OK retention policy settings: OK backup maximum age: OK (no last_backup_maximum_age provided) compression settings: OK failed backups: OK (there are 0 failed backups) minimum redundancy requirements: OK (have 0 backups, expected at least 0) ssh: OK (PostgreSQL server) not in recovery: OK archive_mode: OK archive_command: OK continuous archiving: OK archiver errors: OK
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
barman@nodex:~$ barman backup dn1_sshStarting backup using rsync-exclusive method for server dn1_ssh in /var/lib/barman/dn1_ssh/base/20181008T155150Backup start at LSN: 0/17000028 (000000010000000000000017, 00000028)This is the first backup for server dn1_sshWAL segments preceding the current backup have been found: 000000010000000000000015 from server dn1_ssh has been removedStarting backup copy via rsync/SSH for 20181008T155150Copy done (time: 2 seconds)This is the first backup for server dn1_sshAsking PostgreSQL server to finalize the backup.Backup size: 21.1 MiBBackup end at LSN: 0/17000130 (000000010000000000000017, 00000130)Backup completed (start time: 2018-10-08 15:51:52.151974, elapsed time: 3 seconds)barman@nodex:~$ barman status dn1_sshServer dn1_ssh: Description: dn1 PostgreSQL Database (via SSH) Active: True Disabled: False PostgreSQL version: 9.6.8 Cluster state: in production pgespresso extension: Not available Current data size: 21.0 MiB PostgreSQL Data directory: /data/pg9.6/main Current WAL segment: 000000010000000000000018 PostgreSQL 'archive_command' setting: gzip < %p > /data/backup/pgwalarchive/%f.gz && rsync -a %p barman@192.168.56.101:/var/lib/barman/dn1_ssh/incoming/%f Last archived WAL: 000000010000000000000017.00000028.backup, at Mon Oct 8 15:51:56 2018 Failures of WAL archiver: 17 (000000010000000000000015 at Mon Oct 8 15:32:55 2018) Server WAL archiving rate: 2.22/hour Retention policies: not enforced No. of available backups: 1 First available backup: 20181008T155150 Last available backup: 20181008T155150 Minimum redundancy requirements: satisfied (1/0) ---------------------作者:peiybpeiyb 来源:CSDN 原文:https://blog.csdn.net/ctypyb2002 ... 360?utm_source=copy 版权声明:本文为博主原创文章,转载请附上博文链接! 作者: 不二晨 时间: 2018-10-15 15:56
奈斯作者: 魔都黑马少年梦 时间: 2018-11-1 16:29