PostgreSQL在线热备

1:开源产品 pg_rman

特点:支持在线备份和任意时间点恢复功能,即如果备份做好了,可以恢复到任意故障点


详细情况:

pg_rman --help


2:全备

To take an online backup, use the  backup  command:

$ pg_rman backup --backup-mode=full --with-serverlog


3:查看备份情况

To list all the backups taken so far, use the  show  command:

$ pg_rman show

4:恢复

To restore from a backup, use the  restore  command. Note that pg_rman itself generates the  recovery.conf  file required to perform PostgreSQL PITR.

$ pg_ctl stop -m immediate
$ pg_rman restore
$ cat $PGDATA/recovery.conf
# recovery.conf generated by pg_rman 1.3.7
restore_command = 'cp /home/postgres/arclog/%f %p'
recovery_target_timeline = '1'
$ pg_ctl start


99: 再次强调备份有效性校验

必须定期做,往往问题出现的时候都是一堆问题

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29497382/viewspace-2287034/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29497382/viewspace-2287034/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值