dbreplicator
Description
dbreplicator is a wrapper script for the DBReplicator replication engine that will connect to almost any SQL database and perform update-anywhere asynchronous replication. It uses a publish/subscribe model where multiple subscribers connect to a single publisher and send/recieve changes to the replicated tables. Replicated tables are defined on the publisher, and must be analagous to those defined on the subscriber. Replication can occur across heterogeneous database backends, so long as they are all SQL-based.
dbreplicator uses the DBReplicator API for replication operations.
Publisher Operations
- publish-init
do the initial publication of the database
- publish
run the publication server, listening for connections on PORT_NUMBER from /etc/dbreplicator/publisher.conf
- update-pub
update publication, after making changes to tables published
- pubconsole
start the X11 publisher console ($DISPLAY environment variable must be set)
Subscriber Operations
- subscribe
create initial subscription, based on connection settings in /etc/dbreplicator/subscriber.conf
- update-sub
update subscription, after having updated publication on publisher
- snapshot
get snapshot. must be run before synchronize can be run.
- synchronize-once
run synchronization until successful, then exit
- synchronize
run synchronization constanly, based on timings in /etc/dbreplicator/subscriber.conf
- subconsole
start the X11 subscriber console ($DISPLAY environment variable must be set)
Examples
To set up a publisher and start the publication:
dbreplicator publish-init dbreplicator publish
To set up the subscriber:
dbreplicator subscribe dbreplicator snapshot dbreplicator synchronize
Exit Status
dbreplicator returns a zero exit status if it succeeds in its operation. Non zero is returned in case of failure.
Author
Brian Tilma, Regiscope Digital Imaging (http://dbreplicator.org ) Daffodil Replicator Team ( http://www.daffodildb.com/replicator.html )
Bugs
Does not handle errors very well yet, so pay attention to the log files. As a rule, once it's up and running fine, and synchronization is happening, everything should be fine.

