Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.
Radosław Korzeniewski edited this page Jun 23, 2013 · 24 revisions

Welcome to the pgsql-plugin wiki!

Bacula PostgreSQL Plugin

Bacula PostgreSQL Plugin is a utility which support a backup and restore of PostgreSQL database with Bacula network backup system. PGSQL-FD Plugin loads into a Bacula File Daemon using a Bacula Plugin API. It is a first fully functional and publicly available Bacula File Daemon Plugin. Plugin support an online (Hot) backup of database files and database transaction logs (WAL) archiving (with pgsql-archlog) and backup. With online database and transaction logs backup plugin can perform Poin-In-Time-Restore up to a single selected transaction or date/time. Database recovery is performed fully automatic with dedicated pgsql-restore utility.

PGSQL-FD Plugin was funded and developed by Inteos Sp. z o.o..

Requirements:

  • Bacula source code. It could be Community or Enterprise version
  • compiler utilities and libraries
  • PostgreSQL development library - libpq-dev

INSTALL:

  • All about building and installing Inteos PGSQL Plugin you can find on Install page.

pgsql.conf file for backup:

#
# Config file for pgsql plugin
#
PGDATA = <pg.data.cluster.path>
PGHOST = <path.to.sockets.directory>
PGPORT = <socket.'port'>
PGVERSION = "8.x" | "9.x"
CATDB = <catalog.db.name>
CATDBHOST = <catalog.db.host>
CATDBPORT = <catalog.db.port>
CATUSER = <catalog.db.user>
CATPASSWD = <catalog.db.password>
ARCHDEST = <destination.of.archived.wal's.path>
ARCHCLIENT = <name.of.archived.client>

pgsql.conf file for restore:

#
# Config file for pgsql plugin
#
PGDATA = <pg.data.cluster.path>
PGHOST = <path.to.sockets.directory>
PGPORT = <socket.'port'>
PGSTART = <pg_ctl.command.location.and.options>
PGSTOP = <pg_ctl.command.location.and.options>
CATDB = <catalog.db.name>
CATDBHOST = <catalog.db.host>
CATDBPORT = <catalog.db.port>
CATUSER = <catalog.db.user>
CATPASSWD = <catalog.db.password>
ARCHDEST = <destination.of.archived.wal's.path>
ARCHCLIENT = <name.of.archived.client>
DIRNAME = <director.name>
DIRHOST = <director.address>
DIRPORT = <director.service.port>
DIRPASSWD = <director.connection.password>

and valid bacula console resource in bacula-dir.conf:

#
# Restricted console used for client initiated restore
#
Console {
   Name = <name.of.bacula.client>
   Password = <console.password>
   CommandACL = restore,.filesets,wait
   ClientACL = <name.of.bacula.client>
   CatalogACL = <bacula.catalog>       # it is not pgsql catalog database
   WhereACL = "*all*"
   JobACL = <job.names.for.pgsql.backup.and.pgsql.archbackup>
   PoolACL = <pool.names.of.pgsql.backup.and.pgsql.archbackup>
   StorageACL = <bacula.sd.name>
   FileSetACL = <fileset.name.of.pgsql.db.backup>,<and.pgsql.archbackup>
}
Clone this wiki locally