这篇文章主要讲解了“PostgreSQL有哪些需要注意的问题”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“PostgreSQL有哪些需要注意的问题”吧!

1:开源产品 pg_rman

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

详细情况:

pg_rman --help

2:全备

To take an online backup, use thebackupcommand:

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


3:查看备份情况

To list all the backups taken so far, use theshowcommand:

$pg_rmanshow

4:恢复

To restore from a backup, use therestorecommand. Note that pg_rman itself generates therecovery.conffile required to perform PostgreSQL PITR.

$pg_ctlstop-mimmediate$pg_rmanrestore$cat$PGDATA/recovery.conf#recovery.confgeneratedbypg_rman1.3.7restore_command='cp/home/postgres/arclog/%f%p'recovery_target_timeline='1'$pg_ctlstart

再次强调备份有效性校验

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

感谢各位的阅读,以上就是“PostgreSQL有哪些需要注意的问题”的内容了,经过本文的学习后,相信大家对PostgreSQL有哪些需要注意的问题这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是亿速云,小编将为大家推送更多相关知识点的文章,欢迎关注!