时间:2021-07-01 10:21:17 帮助过:72人阅读
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"‘
PostgreSQL数据库常用归档配置
标签:archive l数据库 gunzip color arch bz2 hive wal res