In Part I, we have already configured backup via rsync/SSH. In this section, we will backup database with this method.
Note: Barman implements incremental backup through a global/server option called reuse_backup, that transparently manages the barman backup command. It accepts three values:
- off: standard full backup (default)
- link: incremental backup, by reusing the last backup for a server and creating a hard link of the unchanged files (for backup space and time reduction)
- copy: incremental backup, by reusing the last backup for a server and creating a copy of the unchanged files (just for backup time reduction)
1. Validate configuration
employees4ssh - Backup employees database via rsync/SSH
[barman@barman-server ~]$ barman
status employees4ssh
Server employees4ssh:
PostgreSQL: OK
superuser or standard user with backup privileges: OK
wal_level: OK
directories: OK
retention policy settings: OK
backup maximum age: OK (no last_backup_maximum_age provided)
backup minimum size: OK (0 B)
wal maximum age: OK (no last_wal_maximum_age provided)
wal size: OK (0 B)
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)
systemid coherence: OK
archive_mode: OK
archive_command: OK
continuous archiving: OK
archiver errors: OK
Server employees4ssh:
active: True
archive_command: barman-wal-archive barman-server employees4ssh %p
archive_mode: on
backup_directory: /barman/backup/employees4ssh
backup_method: rsync
basebackups_directory: /barman/backup/employees4ssh/base
conninfo: host=edb-saigon.taolaoxibup.com user=barman dbname=employees
current_lsn: 0/8DBA0208
current_size: 756601559
current_xlog: 00000001000000000000008D
data_directory: /u01/edb/as16/data
description: Backup employees database via rsync/SSH
errors_directory: /barman/backup/employees4ssh/errors
last_archived_time: 2024-06-12 14:18:51.796703+07:00
last_archived_wal: 00000001000000000000008C
name: employees4ssh
parallel_jobs: 4
ssh_command: ssh enterprisedb@edb-saigon.taolaoxibup.com
streaming_backup_name: barman_streaming_backup
streaming_conninfo: host=edb-saigon.taolaoxibup.com user=barman dbname=employees
streaming_wals_directory: /barman/backup/employees4ssh/streaming
synchronous_standby_names: ['']
wal_level: replica
wal_retention_policy: main
wal_streaming_conninfo: None
wals_directory: /barman/backup/employees4ssh/wals
xlog_segment_size: 16777216