[Bucardo-general] Alternative to onetimecopy with bucardo 5.1.2
sym39
marechal.sylvain2 at gmail.com
Fri Jan 16 09:15:21 UTC 2015
Le 16/01/2015 04:59, Greg Sabino Mullane a écrit :
> On Fri, Jan 09, 2015 at 12:01:29PM +0100, sym39 wrote:
>> -One machine "A" with one database that already have data, some
>> clients regularly fill the database
>> -Another machine "B" with the same database schema, all tables
>> empty, nobody fills the database
> It sounds like what you need is a multi-source sync, in which the
> conflict resolution doesn't matter, as nobody will be writing to B.
> So you want something like this:
>
> bucardo add sync foobar relgroup=myrels dbs=A:source,B:source
>
> To initially populate B, you should setup Bucardo first, so that
> the bucardo triggers on A are in place, then use pg_dump plus
> psql to bulk copy the data from A to B. Something like:
>
> pg_dump -h A mydb --data-only | psql mydb -h B
>
> Once A comes back up, all the changes that accumulated on B
> will be copied by Bucardo onto A.
Ok, so it is best to "manually" fill the content of the database instead
of trying to rely on
bucardo to do this.
In other words, doing something like this is a bad idea:
1. bucardo add sync foobar relgroup=myrels dbs=A:source,B:target
2. wait / check the state of the sync / other
3. bucardo update sync foobar dbs=A:source,B:source
Is it plan to implement the onetimecopy for multiple source mode to make
bucardo do this kind of work under the covers?
Thanks and regards,
Sylvain
More information about the Bucardo-general
mailing list