Skip to content

Instantly share code, notes, and snippets.

@haifahrul
Last active August 9, 2019 06:42
Show Gist options
  • Save haifahrul/be4f8282b55f9879196e1f8a17857160 to your computer and use it in GitHub Desktop.
Save haifahrul/be4f8282b55f9879196e1f8a17857160 to your computer and use it in GitHub Desktop.
sudo bucardo install
# ADD DATABASE
sudo bucardo add db kitaon_master dbname=kitaon host=localhost
sudo bucardo add db kitaon_slave dbname=kitaon_replica host=localhost
# ADD TABLES
sudo bucardo add all tables db=kitaon_master -T history --herd=master --verbose
sudo bucardo add all tables db=kitaon_master -t history --herd=slave --verbose
# ADD SEQUENCES
sudo bucardo add all sequences db=kitaon_master -T history --herd=master-seq --verbose
sudo bucardo add all sequences db=kitaon_master -t history --herd=slave-seq --verbose
# ADD SYNC
sudo bucardo add sync benchdelta relgroup=master dbs=kitaon_slave
sudo bucardo add sync benchcopy relgroup=master dbs=kitaon_slave
sudo bucardo add all tables db=kitaon_master -T history --herd=alpha --verbose &&
sudo bucardo add all tables db=kitaon_master -t history --herd=beta --verbose &&
sudo bucardo add all sequences db=kitaon_master -T history --herd=alpha-seq --verbose &&
sudo bucardo add all sequences db=kitaon_master -t history --herd=beta-seq --verbose &&
sudo bucardo add sync benchdelta relgroup=alpha dbs=kitaon_slave &&
sudo bucardo add sync benchcopy relgroup=beta dbs=kitaon_slave &&
sudo bucardo start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment