Bucardo

127.0.0.1:5432:bucardo:bucardo:password >> .pgpass

chmod 0600 /home/bucardo/.pgpass 

create a bucardo user in database 

modify vim /etc/postgresql/9.1/main/pg_hba.conf
add to bottom: 

cd /opt
git clone git://bucardo.org/bucardo.git

cd bucardo perl Makefile.PL make sudo make install sudo mkdir /run/bucardo sudo chown bucardo /run/bucardo

chown -R bucardo:postgres /opt/bucardo

sudo su bucardo
bucardo install

modify user to bucardo
host is 127.0.0.1

it will probably fail. manage the database and execute

CREATE LANGUAGE 'plperlu';
alter user bucardo with superuser;
GRANT ALL PRIVILEGES ON DATABASE plonedb1 to bucardo;

Deploy Bucardo to database

sudo su bucardo
bucardo set reason_file=/tmp/bucardo.restart.reason.log
bucardo set default_email_from=fromhere@wildcardcorp.com
bucardo set default_email_host=10.0.x.x
bucardo set default_email_to=tothere@wildcardcorp.com


bucardo status

bucardo add db plonedb1_a addallsequences dbname=plonedb1 host=127.0.0.1 group=plone user=bucardo pass=passwordhere
bucardo add db plonedb1_b addallsequences dbname=plonedb1 host=10.0.250.x group=plone user=bucardo pass=passwordhere

bucardo list dbs

bucardo add table public.blob_chunk public.object_ref public.current_object  public.object_refs_added public.object_state  public.pack_object public.pack_state public.pack_state_tid  public.transaction herd=ploneherd
bucardo add dbgroup plonedbgroup1 plonedb1_a:source plonedb1_b:target
bucardo add sync plonedbgroup1sync herd=ploneherd dbs=plonedbgroup1

bucardo start
bucardo update sync plonedbgroup1sync onetimecopy=2 ping=true
bucardo kick plonedbgroup1sync 0

bucardo activate plonedbgroup1sync
bucardo status
bucardo reload plonedbgroup1sync
bucardo status plonedbgroup1sync