1. 非压缩
archive_command = ‘cp %p /appdata/pgsql/pg_wal/%f && echo %f >> /appdata/pgsql/pg_wal/archive.list‘ restore_command = ‘cp /appdata/pgsql/pg_wal/%f %p‘
2. 压缩 gzip
archive_command = ‘gzip < %p > /appdata/pgsql/pg_wal/%f.gz‘ restore_command = ‘gunzip < /appdata/pgsql/pg_wal/%f.gz > %p‘
3. 压缩 bzip2
archive_command = ‘bzip2 < %p > /appdata/pgsql/pg_wal/%f.bz2‘ restore_command = ‘bunzip2 < /appdata/pgsql/pg_wal/%f.bz2 > %p‘
4. 压缩 lz4
archive_command = ‘lz4 -f -q -z %p /appdata/pgsql/pg_wal/%f.lz4‘ restore_command = ‘lz4 -f -q -d /appdata/pgsql/pg_wal/%f.lz4 %p‘
5. scp方式
archive_command = ‘scp %p dragon02:/appdata/pgsql/pg_wal/%f‘ restore_command = ‘scp dragon02:/appdata/pgsql/pg_wal/%f %p‘
6. rsync方式
archive_command = ‘rsync -a %p barman@dragon02:/appdata/pgsql/pg_wal/%f‘ restore_command = ‘rsync -a barman@dragon02:/appdata/pgsql/pg_wal/%f %p‘
7. windows
archive_command = ‘copy "%p" "C:\\appdata\\pgsql\\pg_wal\\%f"‘