SlideShare a Scribd company logo
1 of 10
Download to read offline
backup & restore
Postgresql 9.4
postgresql 9.4 のバックアップ計画
▸ バックアップ 【 backup 】
コンピュータの記憶装置に保存されたデータを別の装置や記憶媒体へ複製
して別に保管するもので、機器の故障や破損、人為ミス、不正行為などに
よってデータの消失や改変などが起こった場合に、複製した時点のデータ
に復旧させることができる。 
  
▸ リストア 【 restore 】
ハードディスクなどの記憶装置が破損するなどしてデータが失われた際に、
以前に取っておいたデータの複製を書き戻すなどして復元することをリスト
アという。     
                   引用:IT用語辞典 e-Words
http://e-words.jp/
postgresql 9.4 のバックアップ計画
Backup手法の検討
▸ コールドバックアップ
データベースを一旦止めて物理的または論理的なバックアップを取得する
→サービス停止があるので今回は❌
▸ ホットバックアップ
 データベースの停止をせずにバックアップの取得が可能→⭕️こちらを採用
⚠ バックアップ取得ポイントのみへのリカバリー
⚠ バックアップ手順が複雑→tool(pg_rman)で楽チン
+α ポイント・イン・タイム・リカバリ(PITR)
バックアップポイント後の更新をリアルタイムでアーカイブしていき、サービス停
止直前 までのリカバリを実現する。→ ⭕basebackupと組み合わせて採用
postgresql 9.4 のバックアップ計画
まとめ
basebackupによる定期的なホットバックアップ
+PITRによるリアルタイムバックアップ
pg_rmanによる定期ホットバックアップ(冗長)
!障害発生!定期backup Restore
WAL
定期backup Restore!障害発生!
この2段構えで!
basebackup + PITRによるbackup
setup
・make a replication user
#attributes
default['postgresql']['custom']['replication']['username'] = 'postgres_backup'
default['postgresql']['custom']['replication']['password'] = 'backup_passwd'
#recipes
echo “CREATE ROLE #{repl_user} WITH REPLICATION LOGIN ENCRYPTED PASSWORD ‘ ¥
#{repl_pass}’;”" | psql -p #{node[‘postgresql’][‘config’][‘port']}
・enable archive mode
# attributes
# postgresql configure
default['postgresql']['config']['archive_mode'] = ‘on
default['postgresql']['config']['archive_command'] = 'if [ ! -d #{wal_dir} ]; th
en mkdir #{wal_dir}; fi; test ! -f #{wal_dir}/%f && gzip < %p > #{wal_dir}/%f’
basebackup + PITRによるbackup
backup & restore
・basebackup
postgres $ pg_basebackup
・restore
・stop postgresql service
root # service postgresql stop
・put backup data & recovery.conf
postgres # cd $pg_data
postgres # tar xfvz yyyymmdd_basebackup.tar.gz
# postgresdata_dir/recovery.conf
gzip < <%= node['postgresql']['custom']['archive_directory'] %>%f >%p
・start postgresql service
root # service postgresql start
・クラウド環境では別ストレージを保存先にすることで冗長性確保が可能
basebackup + PITRによるbackup
directory structure
DB server
Storage A Storage B
DB data Backup data
cloud infra cloud infra cloud infra cloud infra cloud infra
pg_rmanによるbackup
setup
・github sourceからmake
https://github.com/ossc-db/pg_rman
・setup path
# .bash_profile/profile.pg_rman
export PATH=$PATH:#{node['pg_rman']['bin_path']}
export BACKUP_PATH=#{node[‘pg_rman']['backup']}
・pg_rman init
postgres $ pg_rman init -B #{node[‘pg_rman']['backup']} -A #{node['pg_rman']['arclog']} ¥
-D #{node[‘postgresql']['config']['data_directory']}
・edit pg_rman.ini
# templates->pg_rmandir/pg_rman.ini
ARCLOG_PATH=<%= node['pg_rman']['arclog'] %>
SRVLOG_PATH=<%= node['pg_rman']['backup'] %>/pg_log
PGDATA=<%= node['postgresql']['config']['data_directory'] %>
COMPRESS_DATA = <%= node['pg_rman']['config']['compress'] %>
KEEP_ARCLOG_FILES = <%= node['pg_rman']['config']['keep_arclog_files'] %>
KEEP_ARCLOG_DAYS = <%= node['pg_rman']['config']['keep_arclog_days'] %>
KEEP_DATA_GENERATIONS = <%= node['pg_rman']['config']['keep_data_generations'] %>
KEEP_DATA_DAYS = <%= node['pg_rman']['config']['keep_data_days'] %>
KEEP_SRVLOG_FILES = <%= node['pg_rman']['config']['keep_srvlog_files'] %>
KEEP_SRVLOG_DAYS = <%= node['pg_rman']['config']['keep_srvlog_days'] %>
pg_rmanによるbackup
full backup & integral backup & restore
・full backup
postgres $ pg_rman backup -b full
・incremental backup
postgres $ pg_rman backup -b incremental
・restore database
postgres $ pg_rman restore
# When you’ll set a target time
# pg_rman restore --recovery-target-time '2016-01-06 15:12:00'
backupスケジュール
▸ cronによる以下定時backup
pg_rman
毎週日曜日 2:45にfull backup
日曜日以外の毎日 2:45にincremental backup
pg_basebackup
毎週水曜日 3:45にbasebackup
▸ archive modeにて随時walを記録

More Related Content

Recently uploaded

LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルLoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルCRI Japan, Inc.
 
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptxsn679259
 
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
LoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイスLoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイス
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイスCRI Japan, Inc.
 
Utilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native IntegrationsUtilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native IntegrationsWSO2
 
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video UnderstandingToru Tamaki
 
新人研修 後半 2024/04/26の勉強会で発表されたものです。
新人研修 後半        2024/04/26の勉強会で発表されたものです。新人研修 後半        2024/04/26の勉強会で発表されたものです。
新人研修 後半 2024/04/26の勉強会で発表されたものです。iPride Co., Ltd.
 
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。iPride Co., Ltd.
 
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。iPride Co., Ltd.
 
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...Toru Tamaki
 
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Gamesatsushi061452
 

Recently uploaded (10)

LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルLoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
 
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
 
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
LoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイスLoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイス
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
 
Utilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native IntegrationsUtilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native Integrations
 
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
 
新人研修 後半 2024/04/26の勉強会で発表されたものです。
新人研修 後半        2024/04/26の勉強会で発表されたものです。新人研修 後半        2024/04/26の勉強会で発表されたものです。
新人研修 後半 2024/04/26の勉強会で発表されたものです。
 
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
 
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
 
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
 
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Postgresqlのbackup実装

  • 2. postgresql 9.4 のバックアップ計画 ▸ バックアップ 【 backup 】 コンピュータの記憶装置に保存されたデータを別の装置や記憶媒体へ複製 して別に保管するもので、機器の故障や破損、人為ミス、不正行為などに よってデータの消失や改変などが起こった場合に、複製した時点のデータ に復旧させることができる。     ▸ リストア 【 restore 】 ハードディスクなどの記憶装置が破損するなどしてデータが失われた際に、 以前に取っておいたデータの複製を書き戻すなどして復元することをリスト アという。                         引用:IT用語辞典 e-Words http://e-words.jp/
  • 3. postgresql 9.4 のバックアップ計画 Backup手法の検討 ▸ コールドバックアップ データベースを一旦止めて物理的または論理的なバックアップを取得する →サービス停止があるので今回は❌ ▸ ホットバックアップ  データベースの停止をせずにバックアップの取得が可能→⭕️こちらを採用 ⚠ バックアップ取得ポイントのみへのリカバリー ⚠ バックアップ手順が複雑→tool(pg_rman)で楽チン +α ポイント・イン・タイム・リカバリ(PITR) バックアップポイント後の更新をリアルタイムでアーカイブしていき、サービス停 止直前 までのリカバリを実現する。→ ⭕basebackupと組み合わせて採用
  • 5. basebackup + PITRによるbackup setup ・make a replication user #attributes default['postgresql']['custom']['replication']['username'] = 'postgres_backup' default['postgresql']['custom']['replication']['password'] = 'backup_passwd' #recipes echo “CREATE ROLE #{repl_user} WITH REPLICATION LOGIN ENCRYPTED PASSWORD ‘ ¥ #{repl_pass}’;”" | psql -p #{node[‘postgresql’][‘config’][‘port']} ・enable archive mode # attributes # postgresql configure default['postgresql']['config']['archive_mode'] = ‘on default['postgresql']['config']['archive_command'] = 'if [ ! -d #{wal_dir} ]; th en mkdir #{wal_dir}; fi; test ! -f #{wal_dir}/%f && gzip < %p > #{wal_dir}/%f’
  • 6. basebackup + PITRによるbackup backup & restore ・basebackup postgres $ pg_basebackup ・restore ・stop postgresql service root # service postgresql stop ・put backup data & recovery.conf postgres # cd $pg_data postgres # tar xfvz yyyymmdd_basebackup.tar.gz # postgresdata_dir/recovery.conf gzip < <%= node['postgresql']['custom']['archive_directory'] %>%f >%p ・start postgresql service root # service postgresql start
  • 7. ・クラウド環境では別ストレージを保存先にすることで冗長性確保が可能 basebackup + PITRによるbackup directory structure DB server Storage A Storage B DB data Backup data cloud infra cloud infra cloud infra cloud infra cloud infra
  • 8. pg_rmanによるbackup setup ・github sourceからmake https://github.com/ossc-db/pg_rman ・setup path # .bash_profile/profile.pg_rman export PATH=$PATH:#{node['pg_rman']['bin_path']} export BACKUP_PATH=#{node[‘pg_rman']['backup']} ・pg_rman init postgres $ pg_rman init -B #{node[‘pg_rman']['backup']} -A #{node['pg_rman']['arclog']} ¥ -D #{node[‘postgresql']['config']['data_directory']} ・edit pg_rman.ini # templates->pg_rmandir/pg_rman.ini ARCLOG_PATH=<%= node['pg_rman']['arclog'] %> SRVLOG_PATH=<%= node['pg_rman']['backup'] %>/pg_log PGDATA=<%= node['postgresql']['config']['data_directory'] %> COMPRESS_DATA = <%= node['pg_rman']['config']['compress'] %> KEEP_ARCLOG_FILES = <%= node['pg_rman']['config']['keep_arclog_files'] %> KEEP_ARCLOG_DAYS = <%= node['pg_rman']['config']['keep_arclog_days'] %> KEEP_DATA_GENERATIONS = <%= node['pg_rman']['config']['keep_data_generations'] %> KEEP_DATA_DAYS = <%= node['pg_rman']['config']['keep_data_days'] %> KEEP_SRVLOG_FILES = <%= node['pg_rman']['config']['keep_srvlog_files'] %> KEEP_SRVLOG_DAYS = <%= node['pg_rman']['config']['keep_srvlog_days'] %>
  • 9. pg_rmanによるbackup full backup & integral backup & restore ・full backup postgres $ pg_rman backup -b full ・incremental backup postgres $ pg_rman backup -b incremental ・restore database postgres $ pg_rman restore # When you’ll set a target time # pg_rman restore --recovery-target-time '2016-01-06 15:12:00'
  • 10. backupスケジュール ▸ cronによる以下定時backup pg_rman 毎週日曜日 2:45にfull backup 日曜日以外の毎日 2:45にincremental backup pg_basebackup 毎週水曜日 3:45にbasebackup ▸ archive modeにて随時walを記録