This page describes how to install Bucardo. If you are looking for upgrading from a previous version see Bucardo Upgrade.
If you want a packaged version, skip to Installation From Packages, FreeBSD users can skip to Installation From FreeBSD Ports. For the impatient, here’s the short version:
# Install requirements
# Download and untar the latest Bucardo, then:
perl Makefile.PL && make && sudo make install
bucardo install
The rest of this document goes into details about the installation process.
Bucardo requires the Perl module DBIx::Safe to be installed. Some distributions have it available as a package, in which case the installation is as simple as:
yum install perl-DBIx-Safe
# or
apt-get install libdbix-safe-perl
To install it manually, grab the latest DBIx::Safe tarball, then unpack the tarball and install as a normal Perl module:
tar xzf dbix_safe.tar.gz
cd DBIx-Safe-1.2.5
perl Makefile.PL
make
make test
sudo make install
Other Perl requirements that may or may not be installed already on your system are listed in the Requirements page.
The latest version of Bucardo can be found on the Bucardo download page. Untar it and switch to the directory:
tar xzf Bucardo-5.6.0.tar.gz
cd Bucardo-5.6.0
Once in the directory:
perl Makefile.PL
make
sudo make install
The last step (make install) needs to be run as an account that can install to system directories.
If you want to install all the files to a single directory, for testing purposes, you can define the environment variable INSTALL_BUCARDODIR
before running perl Makefile.PL
. Thus, the first step would become:
INSTALL_BUCARDODIR=/tmp/bucardotest perl Makefile.PL
Bucardo needs to be installed into a database. This database must have the PL/PerlU language available. For systems installed via packaging, installing PL/PerlU may be as simple as:
yum install postgresql-plperl
# or
apt-get install postgresql-plperl-9.0
Once you’ve decided where you want the Bucardo database to be installed, run:
bucardo install
You will have an opportunity to change the default parameters:
This will install the bucardo database into an existing Postgres cluster.
Postgres must have been compiled with Perl support,
and you must connect as a superuser
We will create a new superuser named 'bucardo',
and make it the owner of a new database named 'bucardo'
Current connection settings:
1. Host: <none>
2. Port: 5432
3. User: postgres
4. Database: postgres
5. PID directory: /var/run/bucardo
Note that the installation will create the bucardo Postgres account without a password, and then attempt to connect to it to continue the installation. However this may fail depending on your pg_hba.conf settings. Some workarounds include:
The stock pg_hba.conf includes “trust” entries for local connections. Use a trust method connection (perhaps temporarily) to allow it to connect as the bucardo user.
For pg_hba.conf’s “md5” method, create the bucardo Postgres user ahead of time with a password and set that in the ~/.pgpass file of the user running the installation.
Use the “ident” method in pg_hba.conf, and create both a bucardo system account and a bucardo Postgres account. The ident method is enabled by default in Debian-based packages, and will allow the installation to log in if run under the bucardo system account.
If all goes well at this point, Bucardo is installed. Note: Although you do not need to run the install script on each node in your cluster, you need to manually create the ‘bucardo’ Postgres role on each node before proceeding with the installation and configuration.
Tip: If you run into errors during install or in subsequent steps, the best thing to do is to completely remove the bucardo-owned objects and start fresh with the bucardo install
step. This includes doing a cascaded drop of the ‘bucardo’ schema and the ‘bucardo’ role. This should completely remove any traces of bucardo and allow you to run the installation step cleanly again.
Bucardo has been packaged in RPM format and is available from the Fedora Project through their EPEL repo.
Debian .deb packages are also available in Debian’s repositories.
Bucardo is available in the FreeBSD ports system. The FreeBSD project has included a port for compiling and installed Bucardo from source, and also provided packages in the old pkg_* tools format as well as the new PKGNG packaging system. To install from source on FreeBSD:
cd /usr/ports/databases/p5-Bucardo
sudo make install
To install prebuilt packages using the new packaging system on FreeBSD:
sudo pkg install databases/p5-Bucardo
The installation process will automatically install all the dependencies such as DBIx::Safe
This is a quick summary. See the specific pages for more information.
bucardo add database <dbname>
bucardo add all tables`
bucardo add all sequences`
bucardo add sync <syncname> type=<synctype> source=<db> targetdb=<db> tables=<table1>,<table2>,...
Start Bucardo:
bucardo start
End Point Dev offers professional support for Bucardo, as well as specializing in developing, designing, and marketing effective websites. Since 1995, our diverse team of developers has shown that End Point can handle your organization’s greatest web and database challenges.