The onetimecopy mode of a sync instructs it to temporarily switch from a pushdelta mode to a fullcopy mode. In other words, it will unconditionally copy over all rows for each table in the sync from the source to the target. When finished, Bucardo will automatically set this value back to 0.
If this value is set to 2, tables will only be copied if:
This is handy for adding new tables to a sync, in which the target table is empty.
If the target table is not empty, but is not identical to the source, the best way to get them in sync is to truncate or delete all the rows from the target table, and then set onetimecopy to a value of 2. (While you can do the same thing by simply setting it to 1, that will also copy over all the rows for every other table in the sync.)
To change the onetimecopy value of a sync, just run:
bucardo update sync <syncname> onetimecopy=2
A onetimecopy event will appear as a fullcopy sync in the web stats page.
End Point Dev offers professional support for Bucardo, as well as specializing in developing, designing, and marketing effective websites. Since 1995, our diverse team of developers has shown that End Point can handle your organization’s greatest web and database challenges.