-
Notifications
You must be signed in to change notification settings - Fork 7
Home
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..
- Bacula source code. It could be Community or Enterprise version
- compiler utilities and libraries
- PostgreSQL development library - libpq-dev
For successful build you should choose a proper Makefile based on your Operating System. You can choose from: Linux, OSX and Solaris. Next you need to setup a Makefile variables inside selected makefile:
BACULASRC = bacula.enterprise.git
is where your Bacula source code is available relative to '..' directory.
plugindir = /opt/bacula/plugins
sbindir = /opt/bacula/bin
libdir = /opt/bacula/lib64
confdir = /opt/bacula/etc
are where you want to install pgsql plugin and utilities.
Next you need to configure and compile Bacula, because plugin compilation require this. Then finally standard:
$ make clean
$ make all
$ sudo make install
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>