Insert source data in target using bucardo

346 Views Asked by At

I want to create sync between two databases using bucardo. It's a one-way sync. Target and source are not identical(schema is same but data is different).

I have setup sync with property onetimecopy=2 but logs shows

has rows and we are in onetimecopy if empty mode, so we will not COPY

I don't want to delete data at the target, just want to copy data from source to target which is not available on the target.

1

There are 1 best solutions below

0
On

The Bucardo documentation for onetimecopy is a bit outdated but onetimecopy=2 only works when the target is not empty.

Set it to 1 to make a COPY from source to target without this limitation but take care with conflicts with the primary key.

For the initial load of data I usually don't rely on Bucardo but in pg_dump or whatever as it seems more easy to understand the process for me.