db-sync icon indicating copy to clipboard operation
db-sync copied to clipboard

Document how to restart failed sync

Open wonder-sk opened this issue 4 years ago • 0 comments

Sometimes users modify structure of their database and this naturally breaks db-sync. It would be good to document how to restart db-sync when this happens.

If the "source" is a geopackage in Mergin project (where the database structure change happened), this boils down to these steps:

  1. delete "base" and "main" schemas in PostgreSQL
  2. start mergin-db-sync again with --init-from-gkpg

If the source is PostgreSQL:

  1. delete "base" schema in PostgreSQL and the geopackage in the Mergin project
  2. start mergin-db-sync again with --init-from-db

wonder-sk avatar Nov 22 '21 10:11 wonder-sk