I've got a postgresql (9.3.5) db that I'd like to replicate. The db consists of several tables, most of which have a primary key and a few dont.
Im using bucardo 5.4.0 and so far I have done this (based on the docs here https://bucardo.org/wiki/Bucardo/pgbench_example)
bucardo add db source_db dbhost=$SOURCE_HOST dbport=$SOURCE_PORT dbname=$SOURCE_DATABASE dbuser=$SOURCE_USERNAME dbpass=$SOURCE_PASSWORD
bucardo add db dest_db dbhost=$DEST_HOST dbport=$DEST_PORT dbname=$DEST_DATABASE dbuser=$DEST_USERNAME dbpass=$DEST_PASSWORD
bucardo add all tables db=source_db -T $TABLES_WITH_NO_PKEY --herd=delta_herd --verbose makedelta=on
bucardo add all tables db=source_db -t $TABLES_WITH_NO_PKEY --herd=copy_herd --verbose
Then I try to add two syncs:
a delta sync which appears to be fine.
bucardo add sync deltasync herd=delta_herd dbs=source_db=source,dest_db=target
a copy sync which I can't get working .... HELP!
bucardo add sync synccopy herd=copy_herd dbs=source_db:source,dest_db:target onetimecopy=2
gives this error:
Failed to add sync: DBD::Pg::st execute failed: ERROR: Table "xxx.yyy" must specify a primary key! at line 117. at line 30. CONTEXT: PL/Perl function "validate_sync" at ./bucardo line 4618.
Can bucardo only replicate tables with a primary key? If it can do those without a primary key what should I be doing?
The docs on the site bucardo.org appear to be quite dated as well - is this project not being maintained anymore?
Appreciate if anyone could shed some light on this.
Thanks