PostgreSQL Plugin Configuration for PITR

With the PITR option, the PostgreSQL Plugin uses Accurate mode information to handle Differential backups, thus the Accurate option in the backup Job resource needs to be enabled. If Accurate mode is not used in Differential level backups, orphan data files in the Cluster directory may occur when restoring. Note that using Accurate mode is not mandatory only Full and Incremental backups are planned.

Job {
 Name = "Postgresql-PITR"
 Client = laptop1-fd
 FileSet = FS_postgresql
 Accurate = yes
 ...
}

FileSet {
 Name = FS_postgresql
 Include {
   Options {
     Signature = MD5
     Compression = GZIP
   }
   Plugin = "postgresql: mode=pitr"
 }
}

In the PITR mode, the PostgreSQL Plugin also accepts the parameters listed here.

If PostgreSQL clusters are planned to be restored using the file relocation feature of Bacula, it is useful to use the PrefixLinks directive in the prepared Restore Job.

For example, if symbolic links in the PGDATA cluster directory are used, like for pg_wal 1 or tablespaces, the default Restore Job will re-create those symbolic links pointing to their original locations and not the restored datas directory, which will break PostgreSQLs recovery process.

On the other hand, if restored files are planned to be moved to their original locations later, outside of Bacula’s restore process, all files linked with absolute names will be broken.

1

In old versions of postgresql (<= 9.x), pg_wal was pg_xlog - it was renamed in version 10.

Go back to the PITR Configuration page.

Go back to the main PostgreSQL Configuration page page.

Go back to the Dedicated Backup Solutions page page.