SlideShare a Scribd company logo
Database Dumps
and Backups
Karen Jex
February 2021
Who am I?
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
3
Agenda
• Why Take Backups?
• Why do we need to Recover?
• What are our Recovery Requirements?
• Backup Methods
• Backup Strategy
• Backup and Recovery Tools
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
4
Why Take Backups?
• Safeguard critical business data
• Recover from database failure
• Recovery strategy
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
5
Practice your disaster recovery
• The only way to be sure that a backup
can be restored is by restoring it
• If you need to restore a database,
it will be an emergency
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
6
Why do we need to Recover?
• Database server crash
• Storage array failure
• Batch process incorrectly modified data
• Human error (or willful destruction)
• Corrupted data file
• Creating development/test databases
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
7
What are our Recovery Requirements?
• Maximum Permitted Data Loss (RPO)
• Maximum Time to Recover (RTO)
• Backup Retention
Backups aren’t
the whole story
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
9
Physical Database Backup
• Offline
• Online
• Continuous archiving
• Storage snapshots
Backup Methods
Logical Database Backup
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
10
Physical Database Backups
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
11
Physical Database Backups
Advantages Disadvantages
• Generally faster to backup/restore from
than logical backup
• Allows PITR (if WALs are archived)
• Full or incremental backups
• Lack of flexibility
(backup/restore entire database cluster)
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
12
Offline Backups
(Physical Database Backups)
• Shut down database cluster
• Copy database files
• Start up database cluster
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
13
Advantages Disadvantages
• Any file copy tool can be used
• No need to back up associated WAL files
• Database unavailable during the backup
• PITR is not possible
Offline Backups
(Physical Database Backups)
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
14
• WAL = write-ahead log
• wal_level : minimal, replica (default) or logical
• archive_mode: off, on or always
• archive_command
WAL files
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
15
• Tell PostgreSQL you’re starting a backup
• Copy the database files
• Copy the WAL files
• Tell PostgreSQL you’ve finished the backup
Online Backups
(Physical Database Backups)
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
16
Advantages Disadvantages
• Database available during backup • WAL files must be backed up
• WAL parameters must be set correctly
Online Backups
(Physical Database Backups)
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
17
• All WAL files are backed up
• Allows PITR
Continuous Archiving
(Physical Database Backups)
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
18
Storage Snapshots
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
19
Storage Snapshots
• Consistent snapshot of the filesystem
• WAL files must be backed up
• Perform CHECKPOINT just before the snapshot
• Checkpoints of FS containing WAL and each tablespace must be simultaneous
• TEST
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
20
Logical Database Backups
my_db.dump
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
21
Logical Database Backups
Advantages Disadvantages
• Flexibility
• Cross-version compatibility
• Slower restore than from physical
backup
• No PITR
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
22
Comparison of Backup Methods
Allows point in
time recovery
Database available
during backup
Allows backup of
individual objects
Offline Backup
Online Backup ✔
Continuous archiving ✔ ✔
Logical Backup/Dump ✔ ✔
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
23
Backup Strategy
• Backup method
• Frequency of backups
• Full or incremental backups
• Retention period
Backup and
Recovery Tools
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
25
• Point in time recovery (PITR)
• Central backup architecture
• Scheduling
• Backup Catalogue
• Management of Backup and WAL files
Requirements of a Backup/Recovery Tool
• WAL archiving
• Monitoring and alerting
• Compression
• Incremental Backups
• Backup/restore of individual objects
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
26
Requirements of a Backup/Recovery Tool
Point in time recovery (PITR)
Sun Mon Tue Wed Thu Fri Sat
Backup 03:00 Batch 05:00 Backup 03:00 Backup 03:00 Batch 05:00
OLTP 09:00 - 18:00 OLTP 09:00 - 18:00 OLTP 09:00 - 18:00 OLTP 09:00 - 18:00 OLTP 09:00 - 18:00
Batch 22:00 Batch 22:00
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
27
Requirements of a Backup/Recovery Tool
Central Backup Architecture
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
28
Requirements of a Backup/Recovery Tool
Scheduling Backup
Catalogue
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
29
Requirements of a Backup/Recovery Tool
Management of Backup and WAL files WAL Archiving
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
30
Requirements of a Backup/Recovery Tool
Monitoring and Alerting Backup/Restore selected
objects
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
31
Requirements of a Backup/Recovery Tool
Compression Incremental Backups
Backup and
Recovery Tools
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
33
Backup and Recovery Tools
Physical Backups Logical Backups
• pg_basebackup
• BART
• Barman
• pgBackRest
• pg_dump
• pg_dumpall
• pg_restore
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
34
No Backup Tool?
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
35
Custom Scripts
https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-ADMIN-BACKUP
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
36
pg_basebackup 1/2
https://www.postgresql.org/docs/current/app-pgbasebackup.html
• Does not affect other clients to the database
• Can be used for point-in-time recovery
• makes a binary copy of the database cluster files
• Puts system in and out of backup mode
• Backs up entire database cluster
• does not manage a backup library
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
37
pg_basebackup 2/2
# pg_basebackup -h mydbserver -z -D /my/backup/location/data
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
38
BART (EDB Backup and Recovery Tool) 1/2
EDB BART 2.6.1 User Guide
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
39
BART
2/2
# bart backup -s <server_name>
# bart restore -s <server_name>
# bart show-backups -s <server_name>
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
40
Barman 1/2
http://docs.pgbarman.org
● Remote backup and restore of multiple servers
● backup catalogs
● incremental backup
● retention policies
● archiving and compression of WAL files and backups
● rsync or PostgreSQL protocol
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
41
Barman 2/2
# barman backup <server_name>
# barman recover <server_name>
# barman list-backup <server_name>
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
42
pgBackRest 1/2
https://pgbackrest.org/
• Parallel Backup & Restore
• Local or Remote Operation
• Full, Incremental, & Differential Backups
• Backup Rotation & Archive Expiration
• Delta Restore
• Parallel, Asynchronous WAL Push & Get
• Tablespace & Link Support
• Encryption
• Limit restore to specific databases
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
43
pgBackRest 2/2
# pgbackrest stanza=<server_name> backup
# pgbackrest stanza=<server_name> restore
# pgbackrest stanza=<server_name> info
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
44
BART/BARMAN/pgBackRest
Common Architecture/Setup
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
45
• Create DB superuser for backups
• Create OS user for backups
• Allow DB connections from the backup server (pg_hba.conf )
• Allow passwordless connections between DB server and backup server
• Allow passwordless connection to DB from backup server
BART/BARMAN/pgBackRest
Common Architecture/Setup
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
46
# backup_config_file
[global section]
backup location
database user
…
[server_name section]
hostname
data directory
…
BART/BARMAN/pgBackRest
Common Architecture/Setup
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
47
BART/BARMAN/pgBackRest
Common Architecture/Setup
/backup_home
server_name
archived_wals
backups
…
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
48
pg_dump
https://www.postgresql.org/docs/current/app-pgdump.html
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
49
pg_dump
https://www.postgresql.org/docs/current/app-pgdump.html
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
50
pg_dump
-F (--format)
c (custom)
d (directory)
t (tar)
-n schema
-t table
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
51
pg_dumpall
https://www.postgresql.org/docs/current/app-pg-dumpall.html
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
52
pg_restore
https://www.postgresql.org/docs/current/app-pgrestore.html
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
53
Comparison of Backup and Recovery Tools
PITR Scheduling
Management of
backup files
WAL archiving Monitoring
Centralised
architecture
BART ✔ via PEM ✔ ✔ via PEM ✔
Barman ✔ ✔ ✔ ✔ ✔ ✔
pgBackRest ✔ ✔ ✔ ✔
pg_dump
pg_dumpall
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
54
Comparison of Backup and Recovery Tools
Compression
Incremental
backups
Specific database /
schema / table
Global objects
Cross-version
compatibility
BART ✔ ✔ ✔
Barman ✔ ✔ ✔
pgBackRest ✔ ✔ Specific database ✔
pg_dump ✔ ✔ ✔
pg_dumpall ✔ ✔ ✔
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
55
Conclusions
• There is a vast array of different backup/export methods
and tools available but they all serve one main purpose,
and that is to support your recovery strategy.
• It is important to determine your recovery requirements
before implementing the backup strategy that fits your
specific needs.
• Your backup strategy may involve one or more of the
methods and tools that we have discussed.
© Copyright EnterpriseDB Corporation, 2020. All rights reserved.
56
Questions
Ad

More Related Content

What's hot (20)

Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
EDB
 
Best Practices & Lessons Learned from Deployment of PostgreSQL
 Best Practices & Lessons Learned from Deployment of PostgreSQL Best Practices & Lessons Learned from Deployment of PostgreSQL
Best Practices & Lessons Learned from Deployment of PostgreSQL
EDB
 
EDB & ELOS Technologies - Break Free from Oracle
EDB & ELOS Technologies - Break Free from OracleEDB & ELOS Technologies - Break Free from Oracle
EDB & ELOS Technologies - Break Free from Oracle
EDB
 
How to Design for Database High Availability
How to Design for Database High AvailabilityHow to Design for Database High Availability
How to Design for Database High Availability
EDB
 
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
EDB
 
PostgreSQL as a Strategic Tool
PostgreSQL as a Strategic ToolPostgreSQL as a Strategic Tool
PostgreSQL as a Strategic Tool
EDB
 
Public Sector Virtual Town Hall: High Availability for PostgreSQL
Public Sector Virtual Town Hall: High Availability for PostgreSQLPublic Sector Virtual Town Hall: High Availability for PostgreSQL
Public Sector Virtual Town Hall: High Availability for PostgreSQL
EDB
 
An overview of reference architectures for Postgres
An overview of reference architectures for PostgresAn overview of reference architectures for Postgres
An overview of reference architectures for Postgres
EDB
 
Why Care Risk Choose PostgreSQL
Why Care Risk Choose PostgreSQLWhy Care Risk Choose PostgreSQL
Why Care Risk Choose PostgreSQL
EDB
 
Overcoming write availability challenges of PostgreSQL
Overcoming write availability challenges of PostgreSQLOvercoming write availability challenges of PostgreSQL
Overcoming write availability challenges of PostgreSQL
EDB
 
Migration DB2 to EDB - Project Experience
 Migration DB2 to EDB - Project Experience Migration DB2 to EDB - Project Experience
Migration DB2 to EDB - Project Experience
EDB
 
Replacing Oracle with EDB Postgres
Replacing Oracle with EDB PostgresReplacing Oracle with EDB Postgres
Replacing Oracle with EDB Postgres
EDB
 
Migrate Today: Proactive Steps to Unhook from Oracle
Migrate Today: Proactive Steps to Unhook from OracleMigrate Today: Proactive Steps to Unhook from Oracle
Migrate Today: Proactive Steps to Unhook from Oracle
EDB
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
EDB
 
Making your PostgreSQL Database Highly Available
Making your PostgreSQL Database Highly AvailableMaking your PostgreSQL Database Highly Available
Making your PostgreSQL Database Highly Available
EDB
 
PostgreSQL as a Strategic Tool
PostgreSQL as a Strategic ToolPostgreSQL as a Strategic Tool
PostgreSQL as a Strategic Tool
EDB
 
Cloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJCloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJ
EDB
 
Webinar: Managing Postgres at Scale
Webinar: Managing Postgres at ScaleWebinar: Managing Postgres at Scale
Webinar: Managing Postgres at Scale
EDB
 
New and Improved Features in PostgreSQL 13
New and Improved Features in PostgreSQL 13New and Improved Features in PostgreSQL 13
New and Improved Features in PostgreSQL 13
EDB
 
PostgreSQL to Accelerate Innovation
PostgreSQL to Accelerate InnovationPostgreSQL to Accelerate Innovation
PostgreSQL to Accelerate Innovation
EDB
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
EDB
 
Best Practices & Lessons Learned from Deployment of PostgreSQL
 Best Practices & Lessons Learned from Deployment of PostgreSQL Best Practices & Lessons Learned from Deployment of PostgreSQL
Best Practices & Lessons Learned from Deployment of PostgreSQL
EDB
 
EDB & ELOS Technologies - Break Free from Oracle
EDB & ELOS Technologies - Break Free from OracleEDB & ELOS Technologies - Break Free from Oracle
EDB & ELOS Technologies - Break Free from Oracle
EDB
 
How to Design for Database High Availability
How to Design for Database High AvailabilityHow to Design for Database High Availability
How to Design for Database High Availability
EDB
 
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
EDB
 
PostgreSQL as a Strategic Tool
PostgreSQL as a Strategic ToolPostgreSQL as a Strategic Tool
PostgreSQL as a Strategic Tool
EDB
 
Public Sector Virtual Town Hall: High Availability for PostgreSQL
Public Sector Virtual Town Hall: High Availability for PostgreSQLPublic Sector Virtual Town Hall: High Availability for PostgreSQL
Public Sector Virtual Town Hall: High Availability for PostgreSQL
EDB
 
An overview of reference architectures for Postgres
An overview of reference architectures for PostgresAn overview of reference architectures for Postgres
An overview of reference architectures for Postgres
EDB
 
Why Care Risk Choose PostgreSQL
Why Care Risk Choose PostgreSQLWhy Care Risk Choose PostgreSQL
Why Care Risk Choose PostgreSQL
EDB
 
Overcoming write availability challenges of PostgreSQL
Overcoming write availability challenges of PostgreSQLOvercoming write availability challenges of PostgreSQL
Overcoming write availability challenges of PostgreSQL
EDB
 
Migration DB2 to EDB - Project Experience
 Migration DB2 to EDB - Project Experience Migration DB2 to EDB - Project Experience
Migration DB2 to EDB - Project Experience
EDB
 
Replacing Oracle with EDB Postgres
Replacing Oracle with EDB PostgresReplacing Oracle with EDB Postgres
Replacing Oracle with EDB Postgres
EDB
 
Migrate Today: Proactive Steps to Unhook from Oracle
Migrate Today: Proactive Steps to Unhook from OracleMigrate Today: Proactive Steps to Unhook from Oracle
Migrate Today: Proactive Steps to Unhook from Oracle
EDB
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
EDB
 
Making your PostgreSQL Database Highly Available
Making your PostgreSQL Database Highly AvailableMaking your PostgreSQL Database Highly Available
Making your PostgreSQL Database Highly Available
EDB
 
PostgreSQL as a Strategic Tool
PostgreSQL as a Strategic ToolPostgreSQL as a Strategic Tool
PostgreSQL as a Strategic Tool
EDB
 
Cloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJCloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJ
EDB
 
Webinar: Managing Postgres at Scale
Webinar: Managing Postgres at ScaleWebinar: Managing Postgres at Scale
Webinar: Managing Postgres at Scale
EDB
 
New and Improved Features in PostgreSQL 13
New and Improved Features in PostgreSQL 13New and Improved Features in PostgreSQL 13
New and Improved Features in PostgreSQL 13
EDB
 
PostgreSQL to Accelerate Innovation
PostgreSQL to Accelerate InnovationPostgreSQL to Accelerate Innovation
PostgreSQL to Accelerate Innovation
EDB
 

Similar to Database Dumps and Backups (20)

Postgres Point-in-Time Recovery
Postgres Point-in-Time RecoveryPostgres Point-in-Time Recovery
Postgres Point-in-Time Recovery
EDB
 
Beginners Guide to High Availability for Postgres
Beginners Guide to High Availability for PostgresBeginners Guide to High Availability for Postgres
Beginners Guide to High Availability for Postgres
EDB
 
An overview of reference architectures for Postgres
An overview of reference architectures for PostgresAn overview of reference architectures for Postgres
An overview of reference architectures for Postgres
EDB
 
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
EDB
 
Be Proactive: A Good DBA Goes Looking for Signs of Trouble | IDERA
Be Proactive: A Good DBA Goes Looking for Signs of Trouble | IDERABe Proactive: A Good DBA Goes Looking for Signs of Trouble | IDERA
Be Proactive: A Good DBA Goes Looking for Signs of Trouble | IDERA
IDERA Software
 
Beginner's Guide to High Availability for Postgres
Beginner's Guide to High Availability for PostgresBeginner's Guide to High Availability for Postgres
Beginner's Guide to High Availability for Postgres
EDB
 
C7 engineered data_protection_for_oracle_databases
C7 engineered data_protection_for_oracle_databasesC7 engineered data_protection_for_oracle_databases
C7 engineered data_protection_for_oracle_databases
Dr. Wilfred Lin (Ph.D.)
 
9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdf9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdf
sreedb2
 
Best Practices for Becoming an Exceptional Postgres DBA
Best Practices for Becoming an Exceptional Postgres DBA Best Practices for Becoming an Exceptional Postgres DBA
Best Practices for Becoming an Exceptional Postgres DBA
EDB
 
Oracle Backup Solutions Overview August 2018
Oracle Backup Solutions Overview August 2018Oracle Backup Solutions Overview August 2018
Oracle Backup Solutions Overview August 2018
Dan Glasscock
 
How to use postgresql.conf to configure and tune the PostgreSQL server
How to use postgresql.conf to configure and tune the PostgreSQL serverHow to use postgresql.conf to configure and tune the PostgreSQL server
How to use postgresql.conf to configure and tune the PostgreSQL server
EDB
 
Oracle Database 12c para la comunidad GeneXus - Engineered for clouds
Oracle Database 12c para la comunidad GeneXus - Engineered for cloudsOracle Database 12c para la comunidad GeneXus - Engineered for clouds
Oracle Database 12c para la comunidad GeneXus - Engineered for clouds
GeneXus
 
Postgres in production.2014
Postgres in production.2014Postgres in production.2014
Postgres in production.2014
EDB
 
Oracle Storage a ochrana dat
Oracle Storage a ochrana datOracle Storage a ochrana dat
Oracle Storage a ochrana dat
MarketingArrowECS_CZ
 
zdlra-short-overview-4487391_15-06-24.pptx
zdlra-short-overview-4487391_15-06-24.pptxzdlra-short-overview-4487391_15-06-24.pptx
zdlra-short-overview-4487391_15-06-24.pptx
KumarGumala
 
Database backup and recovery basics
Database backup and recovery basicsDatabase backup and recovery basics
Database backup and recovery basics
Shahed Mohamed
 
AUSPC 2013 - Business Continuity Management in SharePoint
AUSPC 2013 - Business Continuity Management in SharePointAUSPC 2013 - Business Continuity Management in SharePoint
AUSPC 2013 - Business Continuity Management in SharePoint
Michael Noel
 
Presentation backup and recovery best practices for very large databases (v...
Presentation   backup and recovery best practices for very large databases (v...Presentation   backup and recovery best practices for very large databases (v...
Presentation backup and recovery best practices for very large databases (v...
xKinAnx
 
Managing Postgres at Scale With Postgres Enterprise Manager
Managing Postgres at Scale With Postgres Enterprise ManagerManaging Postgres at Scale With Postgres Enterprise Manager
Managing Postgres at Scale With Postgres Enterprise Manager
EDB
 
20618782218718364253 emea12 vldb
20618782218718364253 emea12 vldb20618782218718364253 emea12 vldb
20618782218718364253 emea12 vldb
Locuto Riorama
 
Postgres Point-in-Time Recovery
Postgres Point-in-Time RecoveryPostgres Point-in-Time Recovery
Postgres Point-in-Time Recovery
EDB
 
Beginners Guide to High Availability for Postgres
Beginners Guide to High Availability for PostgresBeginners Guide to High Availability for Postgres
Beginners Guide to High Availability for Postgres
EDB
 
An overview of reference architectures for Postgres
An overview of reference architectures for PostgresAn overview of reference architectures for Postgres
An overview of reference architectures for Postgres
EDB
 
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
EDB
 
Be Proactive: A Good DBA Goes Looking for Signs of Trouble | IDERA
Be Proactive: A Good DBA Goes Looking for Signs of Trouble | IDERABe Proactive: A Good DBA Goes Looking for Signs of Trouble | IDERA
Be Proactive: A Good DBA Goes Looking for Signs of Trouble | IDERA
IDERA Software
 
Beginner's Guide to High Availability for Postgres
Beginner's Guide to High Availability for PostgresBeginner's Guide to High Availability for Postgres
Beginner's Guide to High Availability for Postgres
EDB
 
C7 engineered data_protection_for_oracle_databases
C7 engineered data_protection_for_oracle_databasesC7 engineered data_protection_for_oracle_databases
C7 engineered data_protection_for_oracle_databases
Dr. Wilfred Lin (Ph.D.)
 
9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdf9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdf
sreedb2
 
Best Practices for Becoming an Exceptional Postgres DBA
Best Practices for Becoming an Exceptional Postgres DBA Best Practices for Becoming an Exceptional Postgres DBA
Best Practices for Becoming an Exceptional Postgres DBA
EDB
 
Oracle Backup Solutions Overview August 2018
Oracle Backup Solutions Overview August 2018Oracle Backup Solutions Overview August 2018
Oracle Backup Solutions Overview August 2018
Dan Glasscock
 
How to use postgresql.conf to configure and tune the PostgreSQL server
How to use postgresql.conf to configure and tune the PostgreSQL serverHow to use postgresql.conf to configure and tune the PostgreSQL server
How to use postgresql.conf to configure and tune the PostgreSQL server
EDB
 
Oracle Database 12c para la comunidad GeneXus - Engineered for clouds
Oracle Database 12c para la comunidad GeneXus - Engineered for cloudsOracle Database 12c para la comunidad GeneXus - Engineered for clouds
Oracle Database 12c para la comunidad GeneXus - Engineered for clouds
GeneXus
 
Postgres in production.2014
Postgres in production.2014Postgres in production.2014
Postgres in production.2014
EDB
 
zdlra-short-overview-4487391_15-06-24.pptx
zdlra-short-overview-4487391_15-06-24.pptxzdlra-short-overview-4487391_15-06-24.pptx
zdlra-short-overview-4487391_15-06-24.pptx
KumarGumala
 
Database backup and recovery basics
Database backup and recovery basicsDatabase backup and recovery basics
Database backup and recovery basics
Shahed Mohamed
 
AUSPC 2013 - Business Continuity Management in SharePoint
AUSPC 2013 - Business Continuity Management in SharePointAUSPC 2013 - Business Continuity Management in SharePoint
AUSPC 2013 - Business Continuity Management in SharePoint
Michael Noel
 
Presentation backup and recovery best practices for very large databases (v...
Presentation   backup and recovery best practices for very large databases (v...Presentation   backup and recovery best practices for very large databases (v...
Presentation backup and recovery best practices for very large databases (v...
xKinAnx
 
Managing Postgres at Scale With Postgres Enterprise Manager
Managing Postgres at Scale With Postgres Enterprise ManagerManaging Postgres at Scale With Postgres Enterprise Manager
Managing Postgres at Scale With Postgres Enterprise Manager
EDB
 
20618782218718364253 emea12 vldb
20618782218718364253 emea12 vldb20618782218718364253 emea12 vldb
20618782218718364253 emea12 vldb
Locuto Riorama
 
Ad

More from EDB (20)

Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaSCloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
EDB
 
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr UnternehmenDie 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
EDB
 
Migre sus bases de datos Oracle a la nube
Migre sus bases de datos Oracle a la nube Migre sus bases de datos Oracle a la nube
Migre sus bases de datos Oracle a la nube
EDB
 
EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021
EDB
 
Benchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQLBenchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQL
EDB
 
Las Variaciones de la Replicación de PostgreSQL
Las Variaciones de la Replicación de PostgreSQLLas Variaciones de la Replicación de PostgreSQL
Las Variaciones de la Replicación de PostgreSQL
EDB
 
NoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLNoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQL
EDB
 
Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?
EDB
 
Data Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQLData Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQL
EDB
 
Practical Partitioning in Production with Postgres
Practical Partitioning in Production with PostgresPractical Partitioning in Production with Postgres
Practical Partitioning in Production with Postgres
EDB
 
A Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAINA Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAIN
EDB
 
IOT with PostgreSQL
IOT with PostgreSQLIOT with PostgreSQL
IOT with PostgreSQL
EDB
 
A Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQLA Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQL
EDB
 
Psql is awesome!
Psql is awesome!Psql is awesome!
Psql is awesome!
EDB
 
EDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJEDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJ
EDB
 
Comment sauvegarder correctement vos données
Comment sauvegarder correctement vos donnéesComment sauvegarder correctement vos données
Comment sauvegarder correctement vos données
EDB
 
Cloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - ItalianoCloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - Italiano
EDB
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
EDB
 
EDB Postgres & Tools in a Smart City Project
EDB Postgres & Tools in a Smart City ProjectEDB Postgres & Tools in a Smart City Project
EDB Postgres & Tools in a Smart City Project
EDB
 
All you need to know about CREATE STATISTICS
All you need to know about CREATE STATISTICSAll you need to know about CREATE STATISTICS
All you need to know about CREATE STATISTICS
EDB
 
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaSCloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
EDB
 
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr UnternehmenDie 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
EDB
 
Migre sus bases de datos Oracle a la nube
Migre sus bases de datos Oracle a la nube Migre sus bases de datos Oracle a la nube
Migre sus bases de datos Oracle a la nube
EDB
 
EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021
EDB
 
Benchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQLBenchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQL
EDB
 
Las Variaciones de la Replicación de PostgreSQL
Las Variaciones de la Replicación de PostgreSQLLas Variaciones de la Replicación de PostgreSQL
Las Variaciones de la Replicación de PostgreSQL
EDB
 
NoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLNoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQL
EDB
 
Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?
EDB
 
Data Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQLData Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQL
EDB
 
Practical Partitioning in Production with Postgres
Practical Partitioning in Production with PostgresPractical Partitioning in Production with Postgres
Practical Partitioning in Production with Postgres
EDB
 
A Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAINA Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAIN
EDB
 
IOT with PostgreSQL
IOT with PostgreSQLIOT with PostgreSQL
IOT with PostgreSQL
EDB
 
A Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQLA Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQL
EDB
 
Psql is awesome!
Psql is awesome!Psql is awesome!
Psql is awesome!
EDB
 
EDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJEDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJ
EDB
 
Comment sauvegarder correctement vos données
Comment sauvegarder correctement vos donnéesComment sauvegarder correctement vos données
Comment sauvegarder correctement vos données
EDB
 
Cloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - ItalianoCloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - Italiano
EDB
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQLBest Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
EDB
 
EDB Postgres & Tools in a Smart City Project
EDB Postgres & Tools in a Smart City ProjectEDB Postgres & Tools in a Smart City Project
EDB Postgres & Tools in a Smart City Project
EDB
 
All you need to know about CREATE STATISTICS
All you need to know about CREATE STATISTICSAll you need to know about CREATE STATISTICS
All you need to know about CREATE STATISTICS
EDB
 
Ad

Recently uploaded (20)

Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 

Database Dumps and Backups

  • 3. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 3 Agenda • Why Take Backups? • Why do we need to Recover? • What are our Recovery Requirements? • Backup Methods • Backup Strategy • Backup and Recovery Tools
  • 4. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 4 Why Take Backups? • Safeguard critical business data • Recover from database failure • Recovery strategy
  • 5. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 5 Practice your disaster recovery • The only way to be sure that a backup can be restored is by restoring it • If you need to restore a database, it will be an emergency
  • 6. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 6 Why do we need to Recover? • Database server crash • Storage array failure • Batch process incorrectly modified data • Human error (or willful destruction) • Corrupted data file • Creating development/test databases
  • 7. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 7 What are our Recovery Requirements? • Maximum Permitted Data Loss (RPO) • Maximum Time to Recover (RTO) • Backup Retention
  • 9. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 9 Physical Database Backup • Offline • Online • Continuous archiving • Storage snapshots Backup Methods Logical Database Backup
  • 10. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 10 Physical Database Backups
  • 11. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 11 Physical Database Backups Advantages Disadvantages • Generally faster to backup/restore from than logical backup • Allows PITR (if WALs are archived) • Full or incremental backups • Lack of flexibility (backup/restore entire database cluster)
  • 12. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 12 Offline Backups (Physical Database Backups) • Shut down database cluster • Copy database files • Start up database cluster
  • 13. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 13 Advantages Disadvantages • Any file copy tool can be used • No need to back up associated WAL files • Database unavailable during the backup • PITR is not possible Offline Backups (Physical Database Backups)
  • 14. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 14 • WAL = write-ahead log • wal_level : minimal, replica (default) or logical • archive_mode: off, on or always • archive_command WAL files
  • 15. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 15 • Tell PostgreSQL you’re starting a backup • Copy the database files • Copy the WAL files • Tell PostgreSQL you’ve finished the backup Online Backups (Physical Database Backups)
  • 16. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 16 Advantages Disadvantages • Database available during backup • WAL files must be backed up • WAL parameters must be set correctly Online Backups (Physical Database Backups)
  • 17. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 17 • All WAL files are backed up • Allows PITR Continuous Archiving (Physical Database Backups)
  • 18. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 18 Storage Snapshots
  • 19. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 19 Storage Snapshots • Consistent snapshot of the filesystem • WAL files must be backed up • Perform CHECKPOINT just before the snapshot • Checkpoints of FS containing WAL and each tablespace must be simultaneous • TEST
  • 20. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 20 Logical Database Backups my_db.dump
  • 21. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 21 Logical Database Backups Advantages Disadvantages • Flexibility • Cross-version compatibility • Slower restore than from physical backup • No PITR
  • 22. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 22 Comparison of Backup Methods Allows point in time recovery Database available during backup Allows backup of individual objects Offline Backup Online Backup ✔ Continuous archiving ✔ ✔ Logical Backup/Dump ✔ ✔
  • 23. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 23 Backup Strategy • Backup method • Frequency of backups • Full or incremental backups • Retention period
  • 25. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 25 • Point in time recovery (PITR) • Central backup architecture • Scheduling • Backup Catalogue • Management of Backup and WAL files Requirements of a Backup/Recovery Tool • WAL archiving • Monitoring and alerting • Compression • Incremental Backups • Backup/restore of individual objects
  • 26. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 26 Requirements of a Backup/Recovery Tool Point in time recovery (PITR) Sun Mon Tue Wed Thu Fri Sat Backup 03:00 Batch 05:00 Backup 03:00 Backup 03:00 Batch 05:00 OLTP 09:00 - 18:00 OLTP 09:00 - 18:00 OLTP 09:00 - 18:00 OLTP 09:00 - 18:00 OLTP 09:00 - 18:00 Batch 22:00 Batch 22:00
  • 27. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 27 Requirements of a Backup/Recovery Tool Central Backup Architecture
  • 28. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 28 Requirements of a Backup/Recovery Tool Scheduling Backup Catalogue
  • 29. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 29 Requirements of a Backup/Recovery Tool Management of Backup and WAL files WAL Archiving
  • 30. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 30 Requirements of a Backup/Recovery Tool Monitoring and Alerting Backup/Restore selected objects
  • 31. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 31 Requirements of a Backup/Recovery Tool Compression Incremental Backups
  • 33. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 33 Backup and Recovery Tools Physical Backups Logical Backups • pg_basebackup • BART • Barman • pgBackRest • pg_dump • pg_dumpall • pg_restore
  • 34. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 34 No Backup Tool?
  • 35. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 35 Custom Scripts https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-ADMIN-BACKUP
  • 36. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 36 pg_basebackup 1/2 https://www.postgresql.org/docs/current/app-pgbasebackup.html • Does not affect other clients to the database • Can be used for point-in-time recovery • makes a binary copy of the database cluster files • Puts system in and out of backup mode • Backs up entire database cluster • does not manage a backup library
  • 37. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 37 pg_basebackup 2/2 # pg_basebackup -h mydbserver -z -D /my/backup/location/data
  • 38. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 38 BART (EDB Backup and Recovery Tool) 1/2 EDB BART 2.6.1 User Guide
  • 39. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 39 BART 2/2 # bart backup -s <server_name> # bart restore -s <server_name> # bart show-backups -s <server_name>
  • 40. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 40 Barman 1/2 http://docs.pgbarman.org ● Remote backup and restore of multiple servers ● backup catalogs ● incremental backup ● retention policies ● archiving and compression of WAL files and backups ● rsync or PostgreSQL protocol
  • 41. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 41 Barman 2/2 # barman backup <server_name> # barman recover <server_name> # barman list-backup <server_name>
  • 42. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 42 pgBackRest 1/2 https://pgbackrest.org/ • Parallel Backup & Restore • Local or Remote Operation • Full, Incremental, & Differential Backups • Backup Rotation & Archive Expiration • Delta Restore • Parallel, Asynchronous WAL Push & Get • Tablespace & Link Support • Encryption • Limit restore to specific databases
  • 43. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 43 pgBackRest 2/2 # pgbackrest stanza=<server_name> backup # pgbackrest stanza=<server_name> restore # pgbackrest stanza=<server_name> info
  • 44. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 44 BART/BARMAN/pgBackRest Common Architecture/Setup
  • 45. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 45 • Create DB superuser for backups • Create OS user for backups • Allow DB connections from the backup server (pg_hba.conf ) • Allow passwordless connections between DB server and backup server • Allow passwordless connection to DB from backup server BART/BARMAN/pgBackRest Common Architecture/Setup
  • 46. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 46 # backup_config_file [global section] backup location database user … [server_name section] hostname data directory … BART/BARMAN/pgBackRest Common Architecture/Setup
  • 47. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 47 BART/BARMAN/pgBackRest Common Architecture/Setup /backup_home server_name archived_wals backups …
  • 48. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 48 pg_dump https://www.postgresql.org/docs/current/app-pgdump.html
  • 49. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 49 pg_dump https://www.postgresql.org/docs/current/app-pgdump.html
  • 50. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 50 pg_dump -F (--format) c (custom) d (directory) t (tar) -n schema -t table
  • 51. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 51 pg_dumpall https://www.postgresql.org/docs/current/app-pg-dumpall.html
  • 52. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 52 pg_restore https://www.postgresql.org/docs/current/app-pgrestore.html
  • 53. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 53 Comparison of Backup and Recovery Tools PITR Scheduling Management of backup files WAL archiving Monitoring Centralised architecture BART ✔ via PEM ✔ ✔ via PEM ✔ Barman ✔ ✔ ✔ ✔ ✔ ✔ pgBackRest ✔ ✔ ✔ ✔ pg_dump pg_dumpall
  • 54. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 54 Comparison of Backup and Recovery Tools Compression Incremental backups Specific database / schema / table Global objects Cross-version compatibility BART ✔ ✔ ✔ Barman ✔ ✔ ✔ pgBackRest ✔ ✔ Specific database ✔ pg_dump ✔ ✔ ✔ pg_dumpall ✔ ✔ ✔
  • 55. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 55 Conclusions • There is a vast array of different backup/export methods and tools available but they all serve one main purpose, and that is to support your recovery strategy. • It is important to determine your recovery requirements before implementing the backup strategy that fits your specific needs. • Your backup strategy may involve one or more of the methods and tools that we have discussed.
  • 56. © Copyright EnterpriseDB Corporation, 2020. All rights reserved. 56 Questions