溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

PostgreSQL有哪些需要注意的問題

發(fā)布時(shí)間:2021-11-10 10:32:00 來源:億速云 閱讀:92 作者:iii 欄目:關(guān)系型數(shù)據(jù)庫(kù)

這篇文章主要講解了“PostgreSQL有哪些需要注意的問題”,文中的講解內(nèi)容簡(jiǎn)單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“PostgreSQL有哪些需要注意的問題”吧!

1:開源產(chǎn)品 pg_rman

特點(diǎn):支持在線備份和任意時(shí)間點(diǎn)恢復(fù)功能,即如果備份做好了,可以恢復(fù)到任意故障點(diǎn)

詳細(xì)情況:

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:恢復(fù)

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

再次強(qiáng)調(diào)備份有效性校驗(yàn)

必須定期做,往往問題出現(xiàn)的時(shí)候都是一堆問題

感謝各位的閱讀,以上就是“PostgreSQL有哪些需要注意的問題”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對(duì)PostgreSQL有哪些需要注意的問題這一問題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是億速云,小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI