# PostgreSQL DB Sync

DB Sync is a tool that takes care of two-way synchronisation between Mergin Maps and PostGIS databases. The synchronisation works both ways: changes made in a PostGIS database are automatically pushed to a configured Mergin Maps project and changes made in a GeoPackage in the Mergin Maps project are pushed to the PostGIS database.

Interested in using DB Sync? Go to MerginMaps/db-sync (opens new window) repository for the source code and a Quick start that will guide you through the steps to get DB Sync up and running.

Windows users may use a Windows executable for DB sync. On Linux/Mac users are advised to use a docker container. DB Sync configuration wizard can help you with creating the configuration file.

Usage details

DB Sync can be used with Team, Academia and Non-profit subscription plans, as well as in Mergin Maps CE and Mergin Maps EE.

It is not available in Individual or Professional subscriptions.

You can try DB Sync for free during the trial period.

# DB Sync configuration wizard

since QGIS plugin 2023.4

DB Sync configuration file can be generated in QGIS using Mergin Maps QGIS plugin:

  1. Open your Mergin Maps project in QGIS

  2. Using the Plugin menu bar, navigate to Mergin Maps > Configure DB sync tool
    DB Sync configuration wizard in QGIS

  3. DB sync wizard opens.

    Choose if you want to initialise the sync from Mergin Maps project or from the database and follow the steps.
    DB Sync configuration options

  4. At the end, the wizard will generate a file that can be used as initial configuration file for this project to set up DB Sync
    DB Sync configuration file