Overview

PostgreSQL like any other DB, has to be backed up from time to time. From one side to assure recovery from other to sleep better during the night :). In order to simplify things, there are couple major concepts to sync first:

Restore - The physical restore of files (datafiles, configuration files, logs and so on)

Recovery - The synchronization and adjustments between these files. For example, replying an XLOG file is a recovery operation, while restoring the file for that XLOG to be applied on is the restore operation.

Backup & Recovery

Basically there are two ways how a PostgreSQL database can be backed up:

Physical

Logical

Barman Configuration

Pgbackrest