Skip to content


onetime Does Not Work in 4.99.6 #37

theory opened this Issue · 5 comments

4 participants


Tried to set up a two master configuration where one master already had data and the other didn't. Hit reload config and the daemons fired up, which is great, but nothing was copied. I changed a row in the populated master, and the updated data was copied to the other, but none of the existing data was. The onetime attribute was set to 0 after that.

Probably something simple…


I found that onetimecopy works only for db role target

     push @dbs_fullcopy => $dbname
         if ($sync->{onetimecopy} and $x->{role} eq 'target')
             or ($sync->{fullcopy} and $x->{role} eq 'fullcopy');

Hrm. Not familiar with fullcopy will have to look into it.


I'm experimenting with onetimecopy in latest git, a couple revs past 4.99.7, and meeting success. Here's what I can explain. I have a supervisor that waits until the target database comes up. Maybe there's a better way? Meanwhile, my app is running, making local writes to local db. Then, when the supervisor sees the remote db available, it starts bucardo and add my syncs like this:

bucardo add sync sg_sync herd=sgherd conflict_strategy=latest onetimecopy=1 dbs=sggroup

It proceeds with copying to the target at a rate of about 2800 rows/sec in my case. While it's doing this the onetimecopy column in the bucardo.sync db stays "1". Finally, when it's finished copying, that column goes to "0" and regular triggered sync begins.

Let me know If I can answer any questions.


@mnp Is the new database a master in sggroup, or a target?

@theory theory was assigned
@turnstep turnstep was assigned

Reassigned to @turnstep since, via this thread, he's apparently already on the job, at least mentally!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.