Incremental/differential backup and restore

If you have performance problems with backup of a large PostgreSQL database, then you may consider incremental or differential backup.

An incremental backup is a backup of all files that have changed since the last full backup. In order to perform a restore, you must restore the full backup and then each set of incremental changes.

A differential backup is a backup of all individual changes since the last full backup. Again, restore requires you to restore the full backup and then apply any changes since then.

How to do it…

To perform a differential physical backup, you can use rsync to compare the existing files against the previous full backup, and then overwrite only the changed data blocks. It's a bad ...

Get PostgreSQL 9 Administration Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.