
Master PostgreSQL backup and restore fundamentals by exploring physical backups, comparing them with logical backups, and applying practical recovery strategies through hands-on demos.
Define backup and restore concepts for databases, describing how backups copy structure and data for use in the same or another database, and note environment-specific strategies, such as separate disks.
Learn why backup and restore are essential for PostgreSQL databases, as human error, failures, or disasters threaten data integrity and availability, and how a well-planned recovery strategy protects operations.
Explore three techniques for backing up and restoring a PostgreSQL database, and learn when to use each technique for your environment.
Explore the two backup approaches in PostgreSQL—logical backups (sql dumps) and physical backups—covering schema and data recreation, cross-version use, and the speed and constraints of full cluster backups.
Set up a complete demo environment with a sample database for Postgres backups and recovery, including an Ubuntu vm, Postgres 9.6.5, and tablespace and user creation.
PostgreSQL stores data in a data directory owned by the postgres user, and filesystem backups copy this directory to back up and restore the entire cluster.
Explore the file system level backup and restore strategy for PostgreSQL, using cp to back up the data directory and a three-step offline process, then restore and verify with psql.
Learn how to back up and restore a PostgreSQL database using rsync, including a four-step process, incremental backups with checksum, and validation through restoration.
Explore continuous archival and point-in-time recovery in PostgreSQL, including fundamentals, a demo of taking physical backups, and recovering to a specified point in time.
Explore write ahead log (wal) files and how PostgreSQL uses them to protect data, and learn how continuous archival copies wal files from the pg_xlog directory for safe recovery.
Use point-in-time recovery to restore a database to a past date and time, such as 12:05 am to 12:00 am on 22 October 2017, a feature available since PostgreSQL 8.0.
Learn how continuous archiving of WAL files enables point in time recovery in PostgreSQL. Ensure you have a base backup and all WAL backups taken after it.
Learn how to set up continuous archival in PostgreSQL, create base backups, and perform point-in-time recovery using WAL archiving and recovery configurations.
Explore how PITR replays archived WAL files from a base backup at the checkpoint to a defined recovery_target_time, using recovery.conf and archive_command.
Utilize continuous archival of all files for fast backups with incremental changes, enabling point-in-time recovery and standby system operation without requiring a perfectly consistent base backup.
Evaluate the pros and cons of physical backups and logical backups in PostgreSQL, including PITR capabilities, point-in-time restore, full database cluster restoration, and related trade-offs.
Choose logical backups for small databases under 100 gb with pg_dump for quick recovery; use physical backups for large databases near 1 tb to meet production load and test backups.
Practice backup, recovery, and restoration in PostgreSQL with scenarios to master them, and test backups to prevent surprises during hours. Refer to PostgreSQL documentation and forums for deeper insights.
Learn the key terminologies, basic concepts, implementation techniques that you will need to carry out the backup and restoration tasks in PostgreSQL database. Every concepts or topics are covered with hands on demo session to provide better clarity.
Many of the key concepts learned in this course can be applied on other databases as well.
Content and Overview
Through this course, comprising of 6 Sections with multiple lectures and demo sessions, Quiz chapters, Assignments, along with additional resources, you will
You can test the knowledge gained through the sessions by attending quizzes and every use case mentioned in the course are explained with demo sessions thereby enabling you to practice the newly learned skills.
I will add more contents to this course as and when possible.
Downloadable Resources
The backup and restoration scripts used are mostly of one liner form and hence you could watch those in the videos and use the same in your project. Whereas in certain demo sessions, complex scripts are used and the same has been attached as resources for you to download.
You can download the source code files / Environment setup instructions used during the demo sessions, to practice at your end.
Learners who complete this course will gain the knowledge and confidence to implement a fully functional Backup and Restoration solutions in the projects.