SlideShare a Scribd company logo
Advanced PostgreSQL
backup & recovery
methods
Anastasia Lubennikova
Postgres@CERN 2020
1
Agenda
- Why backup?
- What is a good backup tool?
- Overview of advanced backup features
- Overview of PostgreSQL backup tools
Spoiler: this talk doesn’t contain any benchmarks.
2
Why do you need a backup?
- To restore the database after an accident
- hardware failure
- software bug
- human error
- To set up a new replica
- To create a test environment
- To inspect data from the past
3
What are the options?
- replica is not a backup
- dump a.k.a. “logical backup”
- storage snapshots
- pg_basebackup
- set of custom scripts
- PostgreSQL specific backup tools
4
What makes a good backup tool?
- Convenience
- out-of-box automatization of various routines
- documentation & support
- convenient and stable api
- Performance
- parallel execution
- compression
- incremental & differential backups
- WAL prefetch
5
What backup tools exist?
- Barman
- pgBackRest
- pg_probackup
- WAL-G
- BART
- part of the “EDB Advanced Server”
- requires pg_basebackup
6
Who is who? Barman
- https://www.pgbarman.org/
- 2ndQuadrant
- GPL v 3.0
- Python
- first release: 2011
- Two methods: basebackup & rsync
Notable features:
Synchronous streaming for “zero data loss”.
7
Who is who? pgBackRest
- https://pgbackrest.org/
- Crunchy Data
- MIT License
- C
- first release: 2014
Notable features:
Performance optimizations for large backups.
8
Who is who? pg_probackup
- https://github.com/postgrespro/pg_probackup
- Postgres Professional
- PostgreSQL License
- C
- first release: 2017 (based on pg_arman)
Notable features:
Page-level incremental backups and built-in validation.
9
Who is who? WAL-G
- https://github.com/wal-g/wal-g
- introduced by Citus Data,
now maintained by Yandex Cloud team
- Apache License, Version 2.0
- Go
- first release: 2017 ( “based on” WAL-E)
Notable features:
Out-of-box support for various cloud storages.
10
Feature list
1. Documentation & Support
2. Backup management
3. WAL archive management
4. Incremental backups
5. Compression and parallel execution
6. Remote backup
7. Cloud backup
8. Advanced restore options
9. Backup validation
10. Backup retention
11
1. Documentation & Support
12
Documentation
Barman User guide & command reference.
Great overview of backup architectures
pgBackRest User guide & command reference
pg_probackup User guide & command reference
WAL-G README
13
Installation
Barman Linux packages, Build from source
pgBackRest Linux packages, Build from source
pg_probackup Linux packages, Build from source,
Windows installer
WAL-G Linux binary, Build from source
14
Support: bug fixes
Barman https://github.com/2ndquadrant-it/barman/issues
pgBackRest https://github.com/pgbackrest/pgbackrest/issues
pg_probackup https://github.com/postgrespro/pg_probackup/issues
WAL-G https://github.com/wal-g/wal-g/issues
15
Commercial support
Barman 2ndQuadrant
pgBackRest CrunchyData
pg_probackup Postgres Professional
WAL-G
16
2. Backup management
17
Set up new PostgreSQL instance
Barman server
configuration files
pgBackRest stanza
configuration files
pg_probackup instance
configuration files, set-config command
WAL-G -
config via environment variables
18
Backup information
Barman plain
pgBackRest plain, json
+ postgresql table
pg_probackup plain, json
+ detailed wal archive info
WAL-G plain, json
19
3. WAL archive management
20
WAL archive management
Barman rsync / get-wal
pgBackRest archive-push / archive get
archive-async
pg_probackup archive-push / archive-get
WAL-G wal-push / wal-fetch
wal prefetch
21
Streaming backups
- Recovery Point Objective (RPO):
"maximum targeted period in which data might be lost
from an IT service due to a major incident"
- “RPO = 0” (Zero data loss)
can be achieved by synchronous WAL streaming
- replication slot
prevents the removal of WAL that is not yet received
(PostgreSQL feature)
22
Streaming backups
Barman streaming_archiver (pg_recievewal)
replication slot
pgBackRest
pg_probackup backup --stream
replication slot
WAL-G
23
4. Incremental backups
Full backup includes all data files.
Differential backup contains changes since last full backup.
Incremental backup contains changes since last backup.
24
Incremental backup methods
- DELTA - read everything, backup what changed
- independent method
- read load on data server
- PAGE - scan WAL to determine changed blocks
- requires WAL archive
- minimal load on data server
- PTRACK - remember changed blocks in a map
- requires core patch
- minimal load during backup
25
Incremental backups
Barman file-level incremental (DELTA)
pgBackRest file-level incremental (DELTA)
file-level differential (DELTA)
pg_probackup page-level incremental:
DELTA, PAGE, PTRACK
WAL-G page-level incremental (DELTA)
26
5. Compression and parallel execution
27
6. Remote backup
Barman SSH
pgBackRest SSH
pg_probackup SSH
WAL-G
28
7. Cloud backup
29
Backup to cloud storage
Barman scripts to ship backups to S3
pgBackRest Amazon S3
+ encryption
pg_probackup
WAL-G Amazon S3, Google Cloud Storage,
Azure Storage, Swift Object Storage
+ encryption
30
Extra backup features
- Backup from standby (All tools)
- to reduce load on master data server
- Resume backup (only pgBackRest)
31
8. Advanced restore options. PITR
Restore to a certain moment in time.
32
Point-in-time-recovery
Barman recovery target options
pgBackRest recovery target options
pg_probackup recovery target options
WAL-G
33
Partial restore
Barman
pgBackRest restore selected databases
pg_probackup restore selected databases
WAL-G
34
9. Backup validation
35
Validate backups
Barman DIY with custom hooks
on backup & restore
pgBackRest page checksums on backup
pg_probackup page checksums on backup
validate on demand
check instance
WAL-G
36
10. Backup retention
37
10. Backup retention. Redundancy = 3
38
10. Backup retention. Window = 7 days
39
Retention policy
Barman retention_policy = REDUNDANCY
retention_policy = RECOVERY WINDOW
pgBackRest redundancy
pg_probackup --retention-redundancy
--retention-window
WAL-G redundancy: retain N
window: delete before
40
Backup pinning
Barman
pgBackRest
pg_probackup ttl=0
WAL-G backup-mark
41
Archive retention
Barman
pgBackRest Archive Retention
--repo-retention-archive
pg_probackup delete --expired --wal
--wal-depth=1
WAL-G
42
Backup merging
Save space by merging old incremental backups.
43
Backup merging
Barman
pgBackRest
pg_probackup merge
--merge-expired
WAL-G
44
45
Conclusion
Barman
(rsync)
pgBackRest pg_probackup WAL-G
Support + + + +
Backup management + + + -
WAL management + + + +
Incremental backup + + + +
Compression &
parallel execution
+ + + +
46
Conclusion
Barman
(rsync)
pgBackRest pg_probackup WAL-G
Remote backup + + + +
Cloud backup - + - +
Advanced restore + + + -
Backup validation + + + -
Backup retention + + + +
47

More Related Content

What's hot (20)

PDF
What’s the Best PostgreSQL High Availability Framework? PAF vs. repmgr vs. Pa...
ScaleGrid.io
 
PDF
PostgreSQL and RAM usage
Alexey Bashtanov
 
PPTX
Slab Allocator in Linux Kernel
Adrian Huang
 
PDF
What is new in PostgreSQL 14?
Mydbops
 
PDF
Planning for Disaster Recovery (DR) with Galera Cluster
Codership Oy - Creators of Galera Cluster
 
PDF
Patroni - HA PostgreSQL made easy
Alexander Kukushkin
 
PDF
Optimizing MariaDB for maximum performance
MariaDB plc
 
PDF
MariaDB: in-depth (hands on training in Seoul)
Colin Charles
 
PDF
Architecture for building scalable and highly available Postgres Cluster
Ashnikbiz
 
PDF
M|18 Architectural Overview: MariaDB MaxScale
MariaDB plc
 
PDF
Linux tuning to improve PostgreSQL performance
PostgreSQL-Consulting
 
PDF
PostgreSQL Deep Internal
EXEM
 
PDF
The Oracle RAC Family of Solutions - Presentation
Markus Michalewicz
 
PDF
Galera cluster for high availability
Mydbops
 
PDF
Mastering PostgreSQL Administration
EDB
 
PDF
Get to know PostgreSQL!
Oddbjørn Steffensen
 
PDF
[pgday.Seoul 2022] PostgreSQL구조 - 윤성재
PgDay.Seoul
 
PPT
ASM
VINAY PANDEY
 
PDF
Iceberg: A modern table format for big data (Strata NY 2018)
Ryan Blue
 
PDF
PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...
Mydbops
 
What’s the Best PostgreSQL High Availability Framework? PAF vs. repmgr vs. Pa...
ScaleGrid.io
 
PostgreSQL and RAM usage
Alexey Bashtanov
 
Slab Allocator in Linux Kernel
Adrian Huang
 
What is new in PostgreSQL 14?
Mydbops
 
Planning for Disaster Recovery (DR) with Galera Cluster
Codership Oy - Creators of Galera Cluster
 
Patroni - HA PostgreSQL made easy
Alexander Kukushkin
 
Optimizing MariaDB for maximum performance
MariaDB plc
 
MariaDB: in-depth (hands on training in Seoul)
Colin Charles
 
Architecture for building scalable and highly available Postgres Cluster
Ashnikbiz
 
M|18 Architectural Overview: MariaDB MaxScale
MariaDB plc
 
Linux tuning to improve PostgreSQL performance
PostgreSQL-Consulting
 
PostgreSQL Deep Internal
EXEM
 
The Oracle RAC Family of Solutions - Presentation
Markus Michalewicz
 
Galera cluster for high availability
Mydbops
 
Mastering PostgreSQL Administration
EDB
 
Get to know PostgreSQL!
Oddbjørn Steffensen
 
[pgday.Seoul 2022] PostgreSQL구조 - 윤성재
PgDay.Seoul
 
Iceberg: A modern table format for big data (Strata NY 2018)
Ryan Blue
 
PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...
Mydbops
 

Similar to Advanced backup methods (Postgres@CERN) (20)

PDF
PostgreSQL Disaster Recovery with Barman
Gabriele Bartolini
 
PDF
PostgreSQL continuous backup and PITR with Barman
EDB
 
PDF
Webinar: PostgreSQL continuous backup and PITR with Barman
Gabriele Bartolini
 
PDF
PostgreSQL Disaster Recovery with Barman (PGConf.EU 2013)
Gabriele Bartolini
 
PDF
Barman
Viktor Stískala
 
PDF
PGConf APAC 2018 - Managing replication clusters with repmgr, Barman and PgBo...
PGConf APAC
 
PDF
Odoo disaster recovery with barman
Odoo
 
PDF
From 0 to ~100: Business Continuity with PostgreSQL
Gabriele Bartolini
 
PPTX
Database Dumps and Backups
EDB
 
PDF
PGConf.ASIA 2019 Bali - Your Business Continuity Matrix and PostgreSQL's Disa...
Equnix Business Solutions
 
PDF
Barman (PostgreSql) manual
Marcelo Pesallaccia
 
PDF
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam
 
PPTX
Backups
Payal Singh
 
PPTX
Automating Disaster Recovery PostgreSQL
Nina Kaufman
 
PDF
EnterpriseDB BackUp and Recovery Tool
EDB
 
PDF
PostgreSQL Backups the Modern Way pdf 11
Minh237839
 
PDF
Backup recovery with PostgreSQL
Federico Campoli
 
PPTX
PostgreSQL Hangout Replication Features v9.4
Ashnikbiz
 
PDF
GitLab PostgresMortem: Lessons Learned
Alexey Lesovsky
 
PDF
Backup-Recovery in PostgreSQL
Ashnik Pte Ltd
 
PostgreSQL Disaster Recovery with Barman
Gabriele Bartolini
 
PostgreSQL continuous backup and PITR with Barman
EDB
 
Webinar: PostgreSQL continuous backup and PITR with Barman
Gabriele Bartolini
 
PostgreSQL Disaster Recovery with Barman (PGConf.EU 2013)
Gabriele Bartolini
 
PGConf APAC 2018 - Managing replication clusters with repmgr, Barman and PgBo...
PGConf APAC
 
Odoo disaster recovery with barman
Odoo
 
From 0 to ~100: Business Continuity with PostgreSQL
Gabriele Bartolini
 
Database Dumps and Backups
EDB
 
PGConf.ASIA 2019 Bali - Your Business Continuity Matrix and PostgreSQL's Disa...
Equnix Business Solutions
 
Barman (PostgreSql) manual
Marcelo Pesallaccia
 
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam
 
Backups
Payal Singh
 
Automating Disaster Recovery PostgreSQL
Nina Kaufman
 
EnterpriseDB BackUp and Recovery Tool
EDB
 
PostgreSQL Backups the Modern Way pdf 11
Minh237839
 
Backup recovery with PostgreSQL
Federico Campoli
 
PostgreSQL Hangout Replication Features v9.4
Ashnikbiz
 
GitLab PostgresMortem: Lessons Learned
Alexey Lesovsky
 
Backup-Recovery in PostgreSQL
Ashnik Pte Ltd
 
Ad

More from Anastasia Lubennikova (12)

PDF
PgconfSV compression
Anastasia Lubennikova
 
PDF
Btree. Explore the heart of PostgreSQL.
Anastasia Lubennikova
 
PDF
Page compression. PGCON_2016
Anastasia Lubennikova
 
PDF
Hacking PostgreSQL. Локальная память процессов. Контексты памяти.
Anastasia Lubennikova
 
PDF
Hacking PostgreSQL. Разделяемая память и блокировки.
Anastasia Lubennikova
 
ODP
Hacking PostgreSQL. Физическое представление данных
Anastasia Lubennikova
 
PDF
Hacking PostgreSQL. Обзор исходного кода
Anastasia Lubennikova
 
PDF
Расширения для PostgreSQL
Anastasia Lubennikova
 
PDF
Hacking PostgreSQL. Обзор архитектуры.
Anastasia Lubennikova
 
PDF
Архитектура и новые возможности B-tree
Anastasia Lubennikova
 
PDF
Indexes don't mean slow inserts.
Anastasia Lubennikova
 
PDF
Советы для начинающих разработчиков PostgreSQL
Anastasia Lubennikova
 
PgconfSV compression
Anastasia Lubennikova
 
Btree. Explore the heart of PostgreSQL.
Anastasia Lubennikova
 
Page compression. PGCON_2016
Anastasia Lubennikova
 
Hacking PostgreSQL. Локальная память процессов. Контексты памяти.
Anastasia Lubennikova
 
Hacking PostgreSQL. Разделяемая память и блокировки.
Anastasia Lubennikova
 
Hacking PostgreSQL. Физическое представление данных
Anastasia Lubennikova
 
Hacking PostgreSQL. Обзор исходного кода
Anastasia Lubennikova
 
Расширения для PostgreSQL
Anastasia Lubennikova
 
Hacking PostgreSQL. Обзор архитектуры.
Anastasia Lubennikova
 
Архитектура и новые возможности B-tree
Anastasia Lubennikova
 
Indexes don't mean slow inserts.
Anastasia Lubennikova
 
Советы для начинающих разработчиков PostgreSQL
Anastasia Lubennikova
 
Ad

Recently uploaded (20)

PPTX
Perfecting XM Cloud for Multisite Setup.pptx
Ahmed Okour
 
DOCX
Import Data Form Excel to Tally Services
Tally xperts
 
PPTX
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
PPTX
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
PPTX
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PDF
Executive Business Intelligence Dashboards
vandeslie24
 
PPTX
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PDF
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
Perfecting XM Cloud for Multisite Setup.pptx
Ahmed Okour
 
Import Data Form Excel to Tally Services
Tally xperts
 
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Executive Business Intelligence Dashboards
vandeslie24
 
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 

Advanced backup methods (Postgres@CERN)

  • 1. Advanced PostgreSQL backup & recovery methods Anastasia Lubennikova Postgres@CERN 2020 1
  • 2. Agenda - Why backup? - What is a good backup tool? - Overview of advanced backup features - Overview of PostgreSQL backup tools Spoiler: this talk doesn’t contain any benchmarks. 2
  • 3. Why do you need a backup? - To restore the database after an accident - hardware failure - software bug - human error - To set up a new replica - To create a test environment - To inspect data from the past 3
  • 4. What are the options? - replica is not a backup - dump a.k.a. “logical backup” - storage snapshots - pg_basebackup - set of custom scripts - PostgreSQL specific backup tools 4
  • 5. What makes a good backup tool? - Convenience - out-of-box automatization of various routines - documentation & support - convenient and stable api - Performance - parallel execution - compression - incremental & differential backups - WAL prefetch 5
  • 6. What backup tools exist? - Barman - pgBackRest - pg_probackup - WAL-G - BART - part of the “EDB Advanced Server” - requires pg_basebackup 6
  • 7. Who is who? Barman - https://www.pgbarman.org/ - 2ndQuadrant - GPL v 3.0 - Python - first release: 2011 - Two methods: basebackup & rsync Notable features: Synchronous streaming for “zero data loss”. 7
  • 8. Who is who? pgBackRest - https://pgbackrest.org/ - Crunchy Data - MIT License - C - first release: 2014 Notable features: Performance optimizations for large backups. 8
  • 9. Who is who? pg_probackup - https://github.com/postgrespro/pg_probackup - Postgres Professional - PostgreSQL License - C - first release: 2017 (based on pg_arman) Notable features: Page-level incremental backups and built-in validation. 9
  • 10. Who is who? WAL-G - https://github.com/wal-g/wal-g - introduced by Citus Data, now maintained by Yandex Cloud team - Apache License, Version 2.0 - Go - first release: 2017 ( “based on” WAL-E) Notable features: Out-of-box support for various cloud storages. 10
  • 11. Feature list 1. Documentation & Support 2. Backup management 3. WAL archive management 4. Incremental backups 5. Compression and parallel execution 6. Remote backup 7. Cloud backup 8. Advanced restore options 9. Backup validation 10. Backup retention 11
  • 12. 1. Documentation & Support 12
  • 13. Documentation Barman User guide & command reference. Great overview of backup architectures pgBackRest User guide & command reference pg_probackup User guide & command reference WAL-G README 13
  • 14. Installation Barman Linux packages, Build from source pgBackRest Linux packages, Build from source pg_probackup Linux packages, Build from source, Windows installer WAL-G Linux binary, Build from source 14
  • 15. Support: bug fixes Barman https://github.com/2ndquadrant-it/barman/issues pgBackRest https://github.com/pgbackrest/pgbackrest/issues pg_probackup https://github.com/postgrespro/pg_probackup/issues WAL-G https://github.com/wal-g/wal-g/issues 15
  • 16. Commercial support Barman 2ndQuadrant pgBackRest CrunchyData pg_probackup Postgres Professional WAL-G 16
  • 18. Set up new PostgreSQL instance Barman server configuration files pgBackRest stanza configuration files pg_probackup instance configuration files, set-config command WAL-G - config via environment variables 18
  • 19. Backup information Barman plain pgBackRest plain, json + postgresql table pg_probackup plain, json + detailed wal archive info WAL-G plain, json 19
  • 20. 3. WAL archive management 20
  • 21. WAL archive management Barman rsync / get-wal pgBackRest archive-push / archive get archive-async pg_probackup archive-push / archive-get WAL-G wal-push / wal-fetch wal prefetch 21
  • 22. Streaming backups - Recovery Point Objective (RPO): "maximum targeted period in which data might be lost from an IT service due to a major incident" - “RPO = 0” (Zero data loss) can be achieved by synchronous WAL streaming - replication slot prevents the removal of WAL that is not yet received (PostgreSQL feature) 22
  • 23. Streaming backups Barman streaming_archiver (pg_recievewal) replication slot pgBackRest pg_probackup backup --stream replication slot WAL-G 23
  • 24. 4. Incremental backups Full backup includes all data files. Differential backup contains changes since last full backup. Incremental backup contains changes since last backup. 24
  • 25. Incremental backup methods - DELTA - read everything, backup what changed - independent method - read load on data server - PAGE - scan WAL to determine changed blocks - requires WAL archive - minimal load on data server - PTRACK - remember changed blocks in a map - requires core patch - minimal load during backup 25
  • 26. Incremental backups Barman file-level incremental (DELTA) pgBackRest file-level incremental (DELTA) file-level differential (DELTA) pg_probackup page-level incremental: DELTA, PAGE, PTRACK WAL-G page-level incremental (DELTA) 26
  • 27. 5. Compression and parallel execution 27
  • 28. 6. Remote backup Barman SSH pgBackRest SSH pg_probackup SSH WAL-G 28
  • 30. Backup to cloud storage Barman scripts to ship backups to S3 pgBackRest Amazon S3 + encryption pg_probackup WAL-G Amazon S3, Google Cloud Storage, Azure Storage, Swift Object Storage + encryption 30
  • 31. Extra backup features - Backup from standby (All tools) - to reduce load on master data server - Resume backup (only pgBackRest) 31
  • 32. 8. Advanced restore options. PITR Restore to a certain moment in time. 32
  • 33. Point-in-time-recovery Barman recovery target options pgBackRest recovery target options pg_probackup recovery target options WAL-G 33
  • 34. Partial restore Barman pgBackRest restore selected databases pg_probackup restore selected databases WAL-G 34
  • 36. Validate backups Barman DIY with custom hooks on backup & restore pgBackRest page checksums on backup pg_probackup page checksums on backup validate on demand check instance WAL-G 36
  • 38. 10. Backup retention. Redundancy = 3 38
  • 39. 10. Backup retention. Window = 7 days 39
  • 40. Retention policy Barman retention_policy = REDUNDANCY retention_policy = RECOVERY WINDOW pgBackRest redundancy pg_probackup --retention-redundancy --retention-window WAL-G redundancy: retain N window: delete before 40
  • 42. Archive retention Barman pgBackRest Archive Retention --repo-retention-archive pg_probackup delete --expired --wal --wal-depth=1 WAL-G 42
  • 43. Backup merging Save space by merging old incremental backups. 43
  • 45. 45
  • 46. Conclusion Barman (rsync) pgBackRest pg_probackup WAL-G Support + + + + Backup management + + + - WAL management + + + + Incremental backup + + + + Compression & parallel execution + + + + 46
  • 47. Conclusion Barman (rsync) pgBackRest pg_probackup WAL-G Remote backup + + + + Cloud backup - + - + Advanced restore + + + - Backup validation + + + - Backup retention + + + + 47