archive_command 是 postgresql.conf 里的参数。
restore_command 是 recovery.conf 里的参数。

archive_command = 'cp %p /data/backup/pgwalarchive/%f && echo %f >> /data/backup/pgwalarchive/archive.list'

restore_command = 'cp /data/backup/pgwalarchive/%f %p'

压缩 gzip

archive_command = 'gzip < %p > /data/backup/pgwalarchive/%f.gz'

restore_command = 'gunzip < /data/backup/pgwalarchive/%f.gz > %p'

压缩 bzip2

主要用户二进制和大文件。经测试,压缩率比 gzip 要好很多

archive_command = 'bzip2 < %p > /data/backup/pgwalarchive/%f.bz2'

restore_command = 'bunzip2 < /data/backup/pgwalarchive/%f.bz2 > %p'

压缩 lz4

archive_command = 'lz4 -f -q -z %p /data/backup/pgwalarchive/%f.lz4'

restore_command = 'lz4 -f -q -d /data/backup/pgwalarchive/%f.lz4 %p'

相关文章:

  • 2022-12-23
  • 2021-12-12
  • 2021-11-04
  • 2022-12-23
  • 2021-12-25
  • 2021-12-25
  • 2021-12-16
猜你喜欢
  • 2021-07-19
  • 2021-12-30
  • 2022-01-01
  • 2022-02-20
  • 2022-12-23
相关资源
相似解决方案