SlideShare a Scribd company logo
1 of 57
Download to read offline
GABRIELE BARTOLINI
PGDay Australia 2013 - Melbourne, 4 February 2013
GABRIELE BARTOLINI

• Co-Founder   and Manager of 2ndQuadrant Italia

 • Data Architect, Business   critical environments

 • Data   warehousing

• Co-Founder   Italian PostgreSQL Users Group

• Co-Founder   PostgreSQL Europe

• PostgreSQL   Contributor and Advocate
DISCLAIMER
This talk assumes you are familiar with disaster
       recovery concepts and PostgreSQL
  implementation of Point In Time Recovery
BE AWARE
In 2ndQuadrant, all these concepts usually fit in a
2 day workshop on Disaster Recovery and a 1 day
          workshop on Barman alone
OUTLINE



• Business   continuity / Disaster recovery for databases

• Disaster   recovery with Barman for PostgreSQL
PART I
Business continuity / Disaster recovery for databases
BUSINESS CONTINUITY
activity performed by an organization to ensure that critical
business functions will be available to customers, suppliers,
 regulators, and other entities that must have access to those
                    functions - Wikipedia
INFORMATION TECHNOLOGY



•   Business continuity

    •   High availability

    •   Disaster recovery
LAW REQUIREMENTS
In Italy, the “Codice dell’Amministrazione Digitale”
defines business continuity requirements for public
                       administrations
DISASTER
     (touch wood)

system/hardware failures
  unintentional errors
     natural disaster
REACT TO A DISASTER
Recover systems, data and infrastructures
TOO LATE!
Do not wait for a disaster to happen
PLAN FOR DISASTERS
 “Disasters” will happen. Be prepared.
“Plans are worthless, but planning is
    everything. There is a very great distinction
  because when you are planning for an emergency
you must start with this one thing: the very definition
    of "emergency" is that it is unexpected,
 therefore it is not going to happen the way you are
                        planning.”
                                 - Dwight D. Eisenhower
REGULAR CRASH TESTS
DATABASE
DISASTER RECOVERY
  Let’s just focus on databases!
REQUIREMENTS



•   Automated backups          •   Retention policies

•   Notifications (anomalies)   •   Data protection

•   Frequency of backups       •   Availability for recovery
POSTGRES BACKUP

• Hot   backup        • Physical   Backup

  • MVCC                • Full   backup (base backup)

• Logical   Backup      • Differential   backup (WAL)

  • pg_dump
TRADITIONAL DR
              WITH POSTGRESQL
• PostgreSQLprimitives for    • Custom      scripts
 DR are robust and reliable
                              • Hard   to integrate in:
• High   level skills
                               • Backup    solutions
 • DBA
                               • Disaster   Recovery plans
 • Sysadmins
                              • Hard    to test!
EXISTING TOOLS

• Omni-PITR           • WAL-E

 • WAL   centric       • EC2   centric, but ...

• WALmgr                 • good

 • WAL   centric         • came   later

• pg-rman

 • Server   centric
NONE FOR DR
None of them was a pure disaster recovery solution.
   We wanted something similar to Oracle’s RMAN.
FILLING A HOLE
The lack of a DR solution is a barrier towards the adoption
        of PostgreSQL from Oracle users’ point of view.
DESIDERATA

• Hot, Full, Differential   and   • Archival   and compression
 Incremental backups
                                    • WAL      segments
• Multiple   servers
                                    • Periodical   backups
• Remote     backup & recovery
                                  • Automation
• Backup   catalogues
                                  • Integration
• Retention   policies
                                  • Usability
WWW.PGBARMAN.ORG
PART II
Disaster recovery with Barman for PostgreSQL
BARMAN

• GNU     GPL 3                      • Debian/Ubuntu   package

• Hosted   on Sourceforge.net        • Designed, developed,
                                      maintained by 2ndQuadrant
• Python   2.6/2.7

• PostgreSQL    8.4, 9.0, 9.1, 9.2

• PyPI   package

• RPM    package
Postgres     Postgres   Postgres




        Barman
         tape                   Barman




LAN, hybrid architecture
     centralised architecture
Postgres



 Continuous archiving               SSH commands
(WAL shipping via SSH)              SQL commands

                         Barman
Postgres                           Barman



 WAL       secure channel   cron

                     Barman’s
                    WAL archive
Postgres                                 Barman



    Periodical backup (weekly)   Full backup - Sat 1, 4AM

    Differential backup
    Backup catalogue             Full backup - Sat 8, 4AM



                                 Full backup - Sat 15, 4AM



                                 Full backup - Sat 22, 4AM
WAL archive



      Backup 1                           Backup 2

      (100MB)                            (105MB)




WAL    WAL       WAL   WAL   WAL   WAL     WAL      WAL   WAL   WAL



Size: 100MB + 80MB == 260MB Size: 105MB + 80MB = 185MB
              160MB 180MB
CONFIGURATION FILE
[barman]
barman_home = /srv/barman
barman_user = barman
log_file = /var/log/barman/barman.log
log_level = NOTICE
compression = gzip

[production]
description = Production PostgreSQL
ssh_command = ssh pg.2ndQuadrant.it
conninfo = host=pg.2ndQuadrant.it user=postgres
compression = bzip2
MULTI-SERVER
          CONFIGURATION
[barman]
; General configuration
; …
[server_one]
; Configuration for Server 1
; …
[server_two]
; Configuration for Server 2
; …
[server_X]
; …
MULTIPLE FILES INCLUSION


[barman]
; General configuration
; …
configuration_files_directory = /etc/barman.d
CONVENTION OVER
 CONFIGURATION
   global/per server options
    default directory layout
CONVENTIONAL
 DIRECTORIES FOR BARMAN
• barman_home         (/srv/barman)

 • server   directory (/srv/barman/production)

   • base   directory (/srv/barman/production/base)

   • WAL     directory (/srv/barman/production/wals)

   • incoming   directory (/srv/barman/production/incoming)
GLOBAL COMMANDS

• List   of managed servers

 • barman   list-server

• Maintenance      operations

 • barman   cron
SERVER COMMANDS

• Information        and   • Backup   control
 diagnostics
                           • Recovery   control
 • barman   status

 • barman   check

 • barman   show-server

 • barman   list-backup
BACKUP CONTROL

• barman   backup

• barman   show-backup

• barman   list-files

 • standalone, data, wal, full

• barman   delete
SHOW BACKUP

• General                    • WAL

 • Servername, Postgres       • Number     of associated files
  version, status, ...
                              • disk   usage
• Base   backup
                             • Context
 • Start/End
           time, first/last
  WAL, disk usage, ...        • Previous/Next    backup
RECOVERY CONTROL

• Recovery    target (full / point in time)

• Local   recovery

 • barman   recover

• Remote    recovery

 • barman   recover --remote-ssh-command
ADVANCED RECOVERY

• Point   In Time Recovery

 • --target-time   = TIME

 • --target-xid   = XID

• Relocation      of tablespaces

 • --tablespace    NAME:LOCATION [...]
COMMON USE CASES


• Accidental   errors recovery

• Disaster   recovery

• Sandbox    server (BI, staging, ...)
RETENTION POLICIES

• User-defined       policy

• Determines  how long backups and related WAL files need to
 be retained for recovery procedures (point of recoverability):

 • basedon number of backups (REDUNDANCY) or time
   (RECOVERY WINDOW)

• Currently   implemented only in auto mode

 • through ‘barman   cron’
RETENTION POLICY
         CONFIGURATION
; Base backup retention policy
retention_policy = 'redundancy 3'
retention_policy = 'recovery window of 3 months'

; WAL retention policy
wal_retention_policy = 'base'
; The following is currently not supported
wal_retention_policy =
    'recovery window of 14 days'
SPONSOR A FEATURE!

• Sandbox    recovery            • Replication protocol support
                                  (client / server)
• Export/Import
                                 • Incremental   backup
• Logical   backup integration
                                   • reduce   backup time and
  • pg_dump     on sandbox          size
   instances
OUR COMMITMENT


• Keep   it open source

• Reinvest   money from sale of DR turnkey solutions in R&D

• Support    and maintain RPM/Debian packages

• Accept   sponsorships for new features development
CSI PIEMONTE

     (One of the top 10 ICT companies in Italy for revenue)

 “We found in Barman the optimal solution for physical backup
   and disaster recovery of PostgreSQL databases. Barman is
robust and easy to use. Its command interface allows an easy
   integration with the existing management tools in our
                          enviroment.”

      Sponsors of RPM package and WAL compression
CONCLUSIONS

• Hides   complexity of PITR / Keeps unaltered PITR strenghts

• Not   invasive

• Fosters   migrations from Oracle

• “Standard   de facto” for PostgreSQL Disaster Recovery

• Advice: plan     for DR (if you have not done it yet)
QUESTIONS?
Gabriele.Bartolini@2ndQuadrant.it
      Twitter: _GBartolini_
       www.pgbarman.org
THANK YOU!
LICENSE



This work is licensed under a Creative Commons Attribution-
     NonCommercial-ShareAlike 3.0 Unported License

         Copyright (c) 2012, 2013 - 2ndQuadrant.it

More Related Content

What's hot

[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google Cloud[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google CloudPgDay.Seoul
 
Under the Hood of a Shard-per-Core Database Architecture
Under the Hood of a Shard-per-Core Database ArchitectureUnder the Hood of a Shard-per-Core Database Architecture
Under the Hood of a Shard-per-Core Database ArchitectureScyllaDB
 
Apache Spark Core—Deep Dive—Proper Optimization
Apache Spark Core—Deep Dive—Proper OptimizationApache Spark Core—Deep Dive—Proper Optimization
Apache Spark Core—Deep Dive—Proper OptimizationDatabricks
 
Best Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWSBest Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWSAmazon Web Services
 
What’s New in Amazon Aurora for MySQL and PostgreSQL
What’s New in Amazon Aurora for MySQL and PostgreSQLWhat’s New in Amazon Aurora for MySQL and PostgreSQL
What’s New in Amazon Aurora for MySQL and PostgreSQLAmazon Web Services
 
Design Patterns using Amazon DynamoDB
 Design Patterns using Amazon DynamoDB Design Patterns using Amazon DynamoDB
Design Patterns using Amazon DynamoDBAmazon Web Services
 
Keeping Spark on Track: Productionizing Spark for ETL
Keeping Spark on Track: Productionizing Spark for ETLKeeping Spark on Track: Productionizing Spark for ETL
Keeping Spark on Track: Productionizing Spark for ETLDatabricks
 
Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016
Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016
Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016Amazon Web Services
 
Amazon Athena를 통한 데이터 분석하기 - 김명보 (VCNC)
Amazon Athena를 통한 데이터 분석하기 - 김명보 (VCNC)Amazon Athena를 통한 데이터 분석하기 - 김명보 (VCNC)
Amazon Athena를 통한 데이터 분석하기 - 김명보 (VCNC)AWSKRUG - AWS한국사용자모임
 
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRestPGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRestPGDay.Amsterdam
 
Scouter와 influx db – grafana 연동 가이드
Scouter와 influx db – grafana 연동 가이드Scouter와 influx db – grafana 연동 가이드
Scouter와 influx db – grafana 연동 가이드Ji-Woong Choi
 
Tuning Apache Kafka Connectors for Flink.pptx
Tuning Apache Kafka Connectors for Flink.pptxTuning Apache Kafka Connectors for Flink.pptx
Tuning Apache Kafka Connectors for Flink.pptxFlink Forward
 
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the CloudAmazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the CloudNoritaka Sekiyama
 
Enabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax EnterpriseEnabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax EnterpriseDataStax Academy
 
Securing Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp VaultSecuring Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp VaultBram Vogelaar
 
Running Apache Spark on Kubernetes: Best Practices and Pitfalls
Running Apache Spark on Kubernetes: Best Practices and PitfallsRunning Apache Spark on Kubernetes: Best Practices and Pitfalls
Running Apache Spark on Kubernetes: Best Practices and PitfallsDatabricks
 
Advanced backup methods (Postgres@CERN)
Advanced backup methods (Postgres@CERN)Advanced backup methods (Postgres@CERN)
Advanced backup methods (Postgres@CERN)Anastasia Lubennikova
 
Application Logging Good Bad Ugly ... Beautiful?
Application Logging Good Bad Ugly ... Beautiful?Application Logging Good Bad Ugly ... Beautiful?
Application Logging Good Bad Ugly ... Beautiful?Anton Chuvakin
 
GlusterFS As an Object Storage
GlusterFS As an Object StorageGlusterFS As an Object Storage
GlusterFS As an Object StorageKeisuke Takahashi
 

What's hot (20)

[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google Cloud[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google Cloud
 
Under the Hood of a Shard-per-Core Database Architecture
Under the Hood of a Shard-per-Core Database ArchitectureUnder the Hood of a Shard-per-Core Database Architecture
Under the Hood of a Shard-per-Core Database Architecture
 
Apache Spark Core—Deep Dive—Proper Optimization
Apache Spark Core—Deep Dive—Proper OptimizationApache Spark Core—Deep Dive—Proper Optimization
Apache Spark Core—Deep Dive—Proper Optimization
 
Best Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWSBest Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWS
 
Dive into PySpark
Dive into PySparkDive into PySpark
Dive into PySpark
 
What’s New in Amazon Aurora for MySQL and PostgreSQL
What’s New in Amazon Aurora for MySQL and PostgreSQLWhat’s New in Amazon Aurora for MySQL and PostgreSQL
What’s New in Amazon Aurora for MySQL and PostgreSQL
 
Design Patterns using Amazon DynamoDB
 Design Patterns using Amazon DynamoDB Design Patterns using Amazon DynamoDB
Design Patterns using Amazon DynamoDB
 
Keeping Spark on Track: Productionizing Spark for ETL
Keeping Spark on Track: Productionizing Spark for ETLKeeping Spark on Track: Productionizing Spark for ETL
Keeping Spark on Track: Productionizing Spark for ETL
 
Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016
Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016
Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016
 
Amazon Athena를 통한 데이터 분석하기 - 김명보 (VCNC)
Amazon Athena를 통한 데이터 분석하기 - 김명보 (VCNC)Amazon Athena를 통한 데이터 분석하기 - 김명보 (VCNC)
Amazon Athena를 통한 데이터 분석하기 - 김명보 (VCNC)
 
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRestPGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
 
Scouter와 influx db – grafana 연동 가이드
Scouter와 influx db – grafana 연동 가이드Scouter와 influx db – grafana 연동 가이드
Scouter와 influx db – grafana 연동 가이드
 
Tuning Apache Kafka Connectors for Flink.pptx
Tuning Apache Kafka Connectors for Flink.pptxTuning Apache Kafka Connectors for Flink.pptx
Tuning Apache Kafka Connectors for Flink.pptx
 
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the CloudAmazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
 
Enabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax EnterpriseEnabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax Enterprise
 
Securing Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp VaultSecuring Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp Vault
 
Running Apache Spark on Kubernetes: Best Practices and Pitfalls
Running Apache Spark on Kubernetes: Best Practices and PitfallsRunning Apache Spark on Kubernetes: Best Practices and Pitfalls
Running Apache Spark on Kubernetes: Best Practices and Pitfalls
 
Advanced backup methods (Postgres@CERN)
Advanced backup methods (Postgres@CERN)Advanced backup methods (Postgres@CERN)
Advanced backup methods (Postgres@CERN)
 
Application Logging Good Bad Ugly ... Beautiful?
Application Logging Good Bad Ugly ... Beautiful?Application Logging Good Bad Ugly ... Beautiful?
Application Logging Good Bad Ugly ... Beautiful?
 
GlusterFS As an Object Storage
GlusterFS As an Object StorageGlusterFS As an Object Storage
GlusterFS As an Object Storage
 

Viewers also liked

Odoo disaster recovery with barman
Odoo disaster recovery with barmanOdoo disaster recovery with barman
Odoo disaster recovery with barmanOdoo
 
Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)Denish Patel
 
PostgreSQL Disaster Recovery with Barman (PGConf.EU 2013)
PostgreSQL Disaster Recovery with Barman (PGConf.EU 2013)PostgreSQL Disaster Recovery with Barman (PGConf.EU 2013)
PostgreSQL Disaster Recovery with Barman (PGConf.EU 2013)Gabriele Bartolini
 
The Essential PostgreSQL.conf
The Essential PostgreSQL.confThe Essential PostgreSQL.conf
The Essential PostgreSQL.confRobert Treat
 
Gerenciamento de Backups PostgreSQL com pgbarman
Gerenciamento de Backups PostgreSQL com pgbarmanGerenciamento de Backups PostgreSQL com pgbarman
Gerenciamento de Backups PostgreSQL com pgbarmanJuliano Atanazio
 
Advanced WAL File Management With OmniPITR
Advanced WAL File Management With OmniPITRAdvanced WAL File Management With OmniPITR
Advanced WAL File Management With OmniPITRRobert Treat
 
Think_your_Postgres_backups_and_recovery_are_safe_lets_talk.pptx
Think_your_Postgres_backups_and_recovery_are_safe_lets_talk.pptxThink_your_Postgres_backups_and_recovery_are_safe_lets_talk.pptx
Think_your_Postgres_backups_and_recovery_are_safe_lets_talk.pptxPayal Singh
 
Teaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & TextspeakTeaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & TextspeakShelly Sanchez Terrell
 
UX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and ArchivesUX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and ArchivesNed Potter
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 
Designing Teams for Emerging Challenges
Designing Teams for Emerging ChallengesDesigning Teams for Emerging Challenges
Designing Teams for Emerging ChallengesAaron Irizarry
 
PostgreSQL 9.3: novità in "vista" (in italiano)
PostgreSQL 9.3: novità in "vista" (in italiano)PostgreSQL 9.3: novità in "vista" (in italiano)
PostgreSQL 9.3: novità in "vista" (in italiano)Gabriele Bartolini
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with DataSeth Familian
 
3 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 20173 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 2017Drift
 
PostreSQL HA and DR Setup & Use Cases
PostreSQL HA and DR Setup & Use CasesPostreSQL HA and DR Setup & Use Cases
PostreSQL HA and DR Setup & Use CasesAshnikbiz
 

Viewers also liked (20)

Odoo disaster recovery with barman
Odoo disaster recovery with barmanOdoo disaster recovery with barman
Odoo disaster recovery with barman
 
Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)Out of the Box Replication in Postgres 9.4(PgCon)
Out of the Box Replication in Postgres 9.4(PgCon)
 
Scaling postgres
Scaling postgresScaling postgres
Scaling postgres
 
PostgreSQL Disaster Recovery with Barman (PGConf.EU 2013)
PostgreSQL Disaster Recovery with Barman (PGConf.EU 2013)PostgreSQL Disaster Recovery with Barman (PGConf.EU 2013)
PostgreSQL Disaster Recovery with Barman (PGConf.EU 2013)
 
The Essential PostgreSQL.conf
The Essential PostgreSQL.confThe Essential PostgreSQL.conf
The Essential PostgreSQL.conf
 
Gerenciamento de Backups PostgreSQL com pgbarman
Gerenciamento de Backups PostgreSQL com pgbarmanGerenciamento de Backups PostgreSQL com pgbarman
Gerenciamento de Backups PostgreSQL com pgbarman
 
Pro Postgres 9
Pro Postgres 9Pro Postgres 9
Pro Postgres 9
 
Advanced WAL File Management With OmniPITR
Advanced WAL File Management With OmniPITRAdvanced WAL File Management With OmniPITR
Advanced WAL File Management With OmniPITR
 
Think_your_Postgres_backups_and_recovery_are_safe_lets_talk.pptx
Think_your_Postgres_backups_and_recovery_are_safe_lets_talk.pptxThink_your_Postgres_backups_and_recovery_are_safe_lets_talk.pptx
Think_your_Postgres_backups_and_recovery_are_safe_lets_talk.pptx
 
Backups
BackupsBackups
Backups
 
Inaugural Addresses
Inaugural AddressesInaugural Addresses
Inaugural Addresses
 
Teaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & TextspeakTeaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & Textspeak
 
UX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and ArchivesUX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and Archives
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 
Designing Teams for Emerging Challenges
Designing Teams for Emerging ChallengesDesigning Teams for Emerging Challenges
Designing Teams for Emerging Challenges
 
PostgreSQL 9.3: novità in "vista" (in italiano)
PostgreSQL 9.3: novità in "vista" (in italiano)PostgreSQL 9.3: novità in "vista" (in italiano)
PostgreSQL 9.3: novità in "vista" (in italiano)
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with Data
 
3 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 20173 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 2017
 
Replicação PostgreSQL com RepManager
Replicação PostgreSQL com RepManagerReplicação PostgreSQL com RepManager
Replicação PostgreSQL com RepManager
 
PostreSQL HA and DR Setup & Use Cases
PostreSQL HA and DR Setup & Use CasesPostreSQL HA and DR Setup & Use Cases
PostreSQL HA and DR Setup & Use Cases
 

Similar to PostgreSQL Disaster Recovery with Barman

Oracle Backup Solutions Overview August 2018
Oracle Backup Solutions Overview August 2018Oracle Backup Solutions Overview August 2018
Oracle Backup Solutions Overview August 2018Dan Glasscock
 
Oracle DataGuard Online Training in USA | INDIA
Oracle DataGuard Online Training in USA | INDIAOracle DataGuard Online Training in USA | INDIA
Oracle DataGuard Online Training in USA | INDIAXoom Trainings
 
Rman Presentation
Rman PresentationRman Presentation
Rman PresentationRick van Ek
 
Proact ExaGrid Seminar Presentation KK 20220419.pdf
Proact ExaGrid Seminar Presentation KK 20220419.pdfProact ExaGrid Seminar Presentation KK 20220419.pdf
Proact ExaGrid Seminar Presentation KK 20220419.pdfKarel Kannel
 
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia DatabasesJaime Crespo
 
[NetApp] Simplified HA:DR Using Storage Solutions
[NetApp] Simplified HA:DR Using Storage Solutions[NetApp] Simplified HA:DR Using Storage Solutions
[NetApp] Simplified HA:DR Using Storage SolutionsPerforce
 
Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...
Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...
Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...SQLExpert.pl
 
A Backup Today Saves Tomorrow
A Backup Today Saves TomorrowA Backup Today Saves Tomorrow
A Backup Today Saves TomorrowAndrew Moore
 
Oracle Database Backups and Disaster Recovery @ Autodesk
Oracle Database Backups and Disaster Recovery @ AutodeskOracle Database Backups and Disaster Recovery @ Autodesk
Oracle Database Backups and Disaster Recovery @ AutodeskAlan Williams
 
Pdb my sql backup london percona live 2012
Pdb my sql backup   london percona live 2012Pdb my sql backup   london percona live 2012
Pdb my sql backup london percona live 2012Pythian
 
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA SolutionsNagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA SolutionsNagios
 
PostgreSQL continuous backup and PITR with Barman
 PostgreSQL continuous backup and PITR with Barman PostgreSQL continuous backup and PITR with Barman
PostgreSQL continuous backup and PITR with BarmanEDB
 
What can QNAP Turbo NAS do for your business
What can QNAP Turbo NAS do for your businessWhat can QNAP Turbo NAS do for your business
What can QNAP Turbo NAS do for your businessqnap
 
Dueling duplications RMAN vs Delphix
Dueling duplications RMAN vs DelphixDueling duplications RMAN vs Delphix
Dueling duplications RMAN vs DelphixKyle Hailey
 
My sql with enterprise storage
My sql with enterprise storageMy sql with enterprise storage
My sql with enterprise storageCaroline_Rose
 
10 ways to improve your rman script
10 ways to improve your rman script10 ways to improve your rman script
10 ways to improve your rman scriptMaris Elsins
 
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsBest Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsJignesh Shah
 

Similar to PostgreSQL Disaster Recovery with Barman (20)

Oracle Backup Solutions Overview August 2018
Oracle Backup Solutions Overview August 2018Oracle Backup Solutions Overview August 2018
Oracle Backup Solutions Overview August 2018
 
Oracle DataGuard Online Training in USA | INDIA
Oracle DataGuard Online Training in USA | INDIAOracle DataGuard Online Training in USA | INDIA
Oracle DataGuard Online Training in USA | INDIA
 
Rman Presentation
Rman PresentationRman Presentation
Rman Presentation
 
Proact ExaGrid Seminar Presentation KK 20220419.pdf
Proact ExaGrid Seminar Presentation KK 20220419.pdfProact ExaGrid Seminar Presentation KK 20220419.pdf
Proact ExaGrid Seminar Presentation KK 20220419.pdf
 
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia Databases
 
[NetApp] Simplified HA:DR Using Storage Solutions
[NetApp] Simplified HA:DR Using Storage Solutions[NetApp] Simplified HA:DR Using Storage Solutions
[NetApp] Simplified HA:DR Using Storage Solutions
 
Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...
Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...
Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL...
 
Philly DB MapR Overview
Philly DB MapR OverviewPhilly DB MapR Overview
Philly DB MapR Overview
 
A Backup Today Saves Tomorrow
A Backup Today Saves TomorrowA Backup Today Saves Tomorrow
A Backup Today Saves Tomorrow
 
Oracle Database Backups and Disaster Recovery @ Autodesk
Oracle Database Backups and Disaster Recovery @ AutodeskOracle Database Backups and Disaster Recovery @ Autodesk
Oracle Database Backups and Disaster Recovery @ Autodesk
 
Exadata Backup
Exadata BackupExadata Backup
Exadata Backup
 
Pdb my sql backup london percona live 2012
Pdb my sql backup   london percona live 2012Pdb my sql backup   london percona live 2012
Pdb my sql backup london percona live 2012
 
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA SolutionsNagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
 
PostgreSQL continuous backup and PITR with Barman
 PostgreSQL continuous backup and PITR with Barman PostgreSQL continuous backup and PITR with Barman
PostgreSQL continuous backup and PITR with Barman
 
What can QNAP Turbo NAS do for your business
What can QNAP Turbo NAS do for your businessWhat can QNAP Turbo NAS do for your business
What can QNAP Turbo NAS do for your business
 
Dueling duplications RMAN vs Delphix
Dueling duplications RMAN vs DelphixDueling duplications RMAN vs Delphix
Dueling duplications RMAN vs Delphix
 
My sql with enterprise storage
My sql with enterprise storageMy sql with enterprise storage
My sql with enterprise storage
 
10 ways to improve your rman script
10 ways to improve your rman script10 ways to improve your rman script
10 ways to improve your rman script
 
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsBest Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
 
Oracle Storage a ochrana dat
Oracle Storage a ochrana datOracle Storage a ochrana dat
Oracle Storage a ochrana dat
 

More from Gabriele Bartolini

Webinar: PostgreSQL continuous backup and PITR with Barman
Webinar: PostgreSQL continuous backup and PITR with BarmanWebinar: PostgreSQL continuous backup and PITR with Barman
Webinar: PostgreSQL continuous backup and PITR with BarmanGabriele Bartolini
 
From 0 to ~100: Business Continuity with PostgreSQL
From 0 to ~100: Business Continuity with PostgreSQLFrom 0 to ~100: Business Continuity with PostgreSQL
From 0 to ~100: Business Continuity with PostgreSQLGabriele Bartolini
 
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)Gabriele Bartolini
 
JSON con PostgreSQL 9.3 (in italiano)
JSON con PostgreSQL 9.3 (in italiano)JSON con PostgreSQL 9.3 (in italiano)
JSON con PostgreSQL 9.3 (in italiano)Gabriele Bartolini
 
Writing infinite scalability web applications with PHP and PostgreSQL
Writing infinite scalability web applications with PHP and PostgreSQLWriting infinite scalability web applications with PHP and PostgreSQL
Writing infinite scalability web applications with PHP and PostgreSQLGabriele Bartolini
 

More from Gabriele Bartolini (6)

Webinar: PostgreSQL continuous backup and PITR with Barman
Webinar: PostgreSQL continuous backup and PITR with BarmanWebinar: PostgreSQL continuous backup and PITR with Barman
Webinar: PostgreSQL continuous backup and PITR with Barman
 
From 0 to ~100: Business Continuity with PostgreSQL
From 0 to ~100: Business Continuity with PostgreSQLFrom 0 to ~100: Business Continuity with PostgreSQL
From 0 to ~100: Business Continuity with PostgreSQL
 
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
 
JSON con PostgreSQL 9.3 (in italiano)
JSON con PostgreSQL 9.3 (in italiano)JSON con PostgreSQL 9.3 (in italiano)
JSON con PostgreSQL 9.3 (in italiano)
 
Writing infinite scalability web applications with PHP and PostgreSQL
Writing infinite scalability web applications with PHP and PostgreSQLWriting infinite scalability web applications with PHP and PostgreSQL
Writing infinite scalability web applications with PHP and PostgreSQL
 
Why use PostgreSQL?
Why use PostgreSQL?Why use PostgreSQL?
Why use PostgreSQL?
 

Recently uploaded

SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 

PostgreSQL Disaster Recovery with Barman

  • 1.
  • 2. GABRIELE BARTOLINI PGDay Australia 2013 - Melbourne, 4 February 2013
  • 3. GABRIELE BARTOLINI • Co-Founder and Manager of 2ndQuadrant Italia • Data Architect, Business critical environments • Data warehousing • Co-Founder Italian PostgreSQL Users Group • Co-Founder PostgreSQL Europe • PostgreSQL Contributor and Advocate
  • 4. DISCLAIMER This talk assumes you are familiar with disaster recovery concepts and PostgreSQL implementation of Point In Time Recovery
  • 5. BE AWARE In 2ndQuadrant, all these concepts usually fit in a 2 day workshop on Disaster Recovery and a 1 day workshop on Barman alone
  • 6. OUTLINE • Business continuity / Disaster recovery for databases • Disaster recovery with Barman for PostgreSQL
  • 7. PART I Business continuity / Disaster recovery for databases
  • 8. BUSINESS CONTINUITY activity performed by an organization to ensure that critical business functions will be available to customers, suppliers, regulators, and other entities that must have access to those functions - Wikipedia
  • 9. INFORMATION TECHNOLOGY • Business continuity • High availability • Disaster recovery
  • 10. LAW REQUIREMENTS In Italy, the “Codice dell’Amministrazione Digitale” defines business continuity requirements for public administrations
  • 11. DISASTER (touch wood) system/hardware failures unintentional errors natural disaster
  • 12. REACT TO A DISASTER Recover systems, data and infrastructures
  • 13. TOO LATE! Do not wait for a disaster to happen
  • 14. PLAN FOR DISASTERS “Disasters” will happen. Be prepared.
  • 15. “Plans are worthless, but planning is everything. There is a very great distinction because when you are planning for an emergency you must start with this one thing: the very definition of "emergency" is that it is unexpected, therefore it is not going to happen the way you are planning.” - Dwight D. Eisenhower
  • 17. DATABASE DISASTER RECOVERY Let’s just focus on databases!
  • 18. REQUIREMENTS • Automated backups • Retention policies • Notifications (anomalies) • Data protection • Frequency of backups • Availability for recovery
  • 19. POSTGRES BACKUP • Hot backup • Physical Backup • MVCC • Full backup (base backup) • Logical Backup • Differential backup (WAL) • pg_dump
  • 20. TRADITIONAL DR WITH POSTGRESQL • PostgreSQLprimitives for • Custom scripts DR are robust and reliable • Hard to integrate in: • High level skills • Backup solutions • DBA • Disaster Recovery plans • Sysadmins • Hard to test!
  • 21. EXISTING TOOLS • Omni-PITR • WAL-E • WAL centric • EC2 centric, but ... • WALmgr • good • WAL centric • came later • pg-rman • Server centric
  • 22. NONE FOR DR None of them was a pure disaster recovery solution. We wanted something similar to Oracle’s RMAN.
  • 23. FILLING A HOLE The lack of a DR solution is a barrier towards the adoption of PostgreSQL from Oracle users’ point of view.
  • 24. DESIDERATA • Hot, Full, Differential and • Archival and compression Incremental backups • WAL segments • Multiple servers • Periodical backups • Remote backup & recovery • Automation • Backup catalogues • Integration • Retention policies • Usability
  • 26. PART II Disaster recovery with Barman for PostgreSQL
  • 27. BARMAN • GNU GPL 3 • Debian/Ubuntu package • Hosted on Sourceforge.net • Designed, developed, maintained by 2ndQuadrant • Python 2.6/2.7 • PostgreSQL 8.4, 9.0, 9.1, 9.2 • PyPI package • RPM package
  • 28. Postgres Postgres Postgres Barman tape Barman LAN, hybrid architecture centralised architecture
  • 29. Postgres Continuous archiving SSH commands (WAL shipping via SSH) SQL commands Barman
  • 30. Postgres Barman WAL secure channel cron Barman’s WAL archive
  • 31. Postgres Barman Periodical backup (weekly) Full backup - Sat 1, 4AM Differential backup Backup catalogue Full backup - Sat 8, 4AM Full backup - Sat 15, 4AM Full backup - Sat 22, 4AM
  • 32. WAL archive Backup 1 Backup 2 (100MB) (105MB) WAL WAL WAL WAL WAL WAL WAL WAL WAL WAL Size: 100MB + 80MB == 260MB Size: 105MB + 80MB = 185MB 160MB 180MB
  • 33. CONFIGURATION FILE [barman] barman_home = /srv/barman barman_user = barman log_file = /var/log/barman/barman.log log_level = NOTICE compression = gzip [production] description = Production PostgreSQL ssh_command = ssh pg.2ndQuadrant.it conninfo = host=pg.2ndQuadrant.it user=postgres compression = bzip2
  • 34. MULTI-SERVER CONFIGURATION [barman] ; General configuration ; … [server_one] ; Configuration for Server 1 ; … [server_two] ; Configuration for Server 2 ; … [server_X] ; …
  • 35. MULTIPLE FILES INCLUSION [barman] ; General configuration ; … configuration_files_directory = /etc/barman.d
  • 36. CONVENTION OVER CONFIGURATION global/per server options default directory layout
  • 37. CONVENTIONAL DIRECTORIES FOR BARMAN • barman_home (/srv/barman) • server directory (/srv/barman/production) • base directory (/srv/barman/production/base) • WAL directory (/srv/barman/production/wals) • incoming directory (/srv/barman/production/incoming)
  • 38. GLOBAL COMMANDS • List of managed servers • barman list-server • Maintenance operations • barman cron
  • 39. SERVER COMMANDS • Information and • Backup control diagnostics • Recovery control • barman status • barman check • barman show-server • barman list-backup
  • 40.
  • 41. BACKUP CONTROL • barman backup • barman show-backup • barman list-files • standalone, data, wal, full • barman delete
  • 42.
  • 43. SHOW BACKUP • General • WAL • Servername, Postgres • Number of associated files version, status, ... • disk usage • Base backup • Context • Start/End time, first/last WAL, disk usage, ... • Previous/Next backup
  • 44.
  • 45. RECOVERY CONTROL • Recovery target (full / point in time) • Local recovery • barman recover • Remote recovery • barman recover --remote-ssh-command
  • 46. ADVANCED RECOVERY • Point In Time Recovery • --target-time = TIME • --target-xid = XID • Relocation of tablespaces • --tablespace NAME:LOCATION [...]
  • 47. COMMON USE CASES • Accidental errors recovery • Disaster recovery • Sandbox server (BI, staging, ...)
  • 48.
  • 49. RETENTION POLICIES • User-defined policy • Determines how long backups and related WAL files need to be retained for recovery procedures (point of recoverability): • basedon number of backups (REDUNDANCY) or time (RECOVERY WINDOW) • Currently implemented only in auto mode • through ‘barman cron’
  • 50. RETENTION POLICY CONFIGURATION ; Base backup retention policy retention_policy = 'redundancy 3' retention_policy = 'recovery window of 3 months' ; WAL retention policy wal_retention_policy = 'base' ; The following is currently not supported wal_retention_policy = 'recovery window of 14 days'
  • 51. SPONSOR A FEATURE! • Sandbox recovery • Replication protocol support (client / server) • Export/Import • Incremental backup • Logical backup integration • reduce backup time and • pg_dump on sandbox size instances
  • 52. OUR COMMITMENT • Keep it open source • Reinvest money from sale of DR turnkey solutions in R&D • Support and maintain RPM/Debian packages • Accept sponsorships for new features development
  • 53. CSI PIEMONTE (One of the top 10 ICT companies in Italy for revenue) “We found in Barman the optimal solution for physical backup and disaster recovery of PostgreSQL databases. Barman is robust and easy to use. Its command interface allows an easy integration with the existing management tools in our enviroment.” Sponsors of RPM package and WAL compression
  • 54. CONCLUSIONS • Hides complexity of PITR / Keeps unaltered PITR strenghts • Not invasive • Fosters migrations from Oracle • “Standard de facto” for PostgreSQL Disaster Recovery • Advice: plan for DR (if you have not done it yet)
  • 55. QUESTIONS? Gabriele.Bartolini@2ndQuadrant.it Twitter: _GBartolini_ www.pgbarman.org
  • 57. LICENSE This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 3.0 Unported License Copyright (c) 2012, 2013 - 2ndQuadrant.it