[Bucardo-general] Question about order of the Bucardo setup

Lucas Possamai drum.lucas at gmail.com
Tue May 11 10:58:35 UTC 2021


On Tue, 11 May 2021 at 19:53, IT Technical Analyst FOD <
fo.ittechnicalanalyst at emergency.it> wrote:

> Hello,
>
> I don’t understand very well why you need a dump of the db; if you use
> that for having 2 databases with exactly the same data, then I would
> proceed like that:
>
> 1.       Dump database A
>
> 2.       Import dump into target database B
>
> 3.       Add your source db to bucardo (bucardo add db A, with tables etc)
> bucardo add db db_A dbhost=myhost dbport=5432 dbname=mydbname
> dbuser=mydbuser dbpass=mydbpassword
>
> 4.       Add your target db to bucardo (bucardo add db B, with tables etc)
> bucardo add db db_B dbhost=myhost_B dbport=5432 dbname=mydbname
> dbuser=mydbuser dbpass=mydbpassword
>
> 5.       Create a sync that has:
>
> a.       database A as source, database B as target if you want a master
> to slave replication
> bucardo add dbgroup grp_m2s_mydbname db_A:source db_B:target
> bucardo add sync sync_mydbname_m2s dbs=grp_m2s_mydbname [‘tables=’]
>
> b.       both databases as source if you want a master to master
> replication (you should choose a conflit resolution strategy,  I use “
> *bucardo_latest*”)
> bucardo add dbgroup grp_m2m_mydbname db_A:source db_B:source
> bucardo add sync sync_mydbname_m2m dbs=grp_m2m_mydbname
> conflict_strategy=bucardo_latest [‘tables=’]
>
> More precisely I created a dbgroup with both databases, and then I add
> that dbgroup to the sync.
> The “tables” parameter is optional, to specify a subset of tables to be
> replicated.
>
> 6.       Start bucardo
>

Yep, that makes sense! I was actually setting up bucardo (adding DB,
tables, sequence, sync, etc) prior dumping and restoring the DB in the
target... but the way you do it is the same way Frank does it, as per his
emails... so that's great. That's what I was looking for.

Cheers!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://bucardo.org/pipermail/bucardo-general/attachments/20210511/162550f2/attachment.htm>


More information about the Bucardo-general mailing list