Bucardo

Last updated: 2020-02-28

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:

  • there is at least one row on the source
  • there are no rows on the target

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.

Bucardo.org is hosted and supported by End Point Dev

End Point Dev logo

Need assistance with Bucardo?

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.