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/