Sync Mergin Maps with PostGIS¶
GeoJibe can keep a Mergin Maps GeoPackage in step with a PostGIS schema.
This is a Sync Job, not a conversion. Mergin Maps cannot be used as a Convert Source.
Mergin Maps is not the same as QFieldCloud. Project listing, change detection, and two-way sync differ.
Before you start¶
You'll need:
- A Mergin Maps account and a project you created or that was shared with you
- A GeoPackage in that project
- A PostGIS Destination
- Sign-in, with Mergin Maps sync enabled on the server
1. Save a Mergin Maps Source¶
Open Sources → Add Source → Mergin Maps.
| Field | What to enter |
|---|---|
| Server URL | Usually https://app.merginmaps.com/ |
| Username / Password | Mergin Maps login |
Click Test, then Save.
2. Save a PostGIS Destination¶
Save the database connection as in Send data to PostGIS. Sync uses a schema only — not a table name or write mode.
3. Create a Sync Job¶
Open Jobs → Add Job → Sync Job, or build it on the Canvas and Save as Job.
- Select the Mergin Maps Source.
- List projects, pick the project, then pick the GeoPackage.
- Choose direction:
- Mergin Maps → PostGIS — one-way pull (the usual choice)
- Mergin Maps ⇄ PostGIS — two-way, advanced
- Select the PostGIS Destination and schema.
- Set Every N minutes and a timezone.
- Enable the schedule if you want it to repeat.
- Save Job.
Note
Two-way is an advanced option. QFieldCloud is always one-way into PostGIS. Two-way is only available for Mergin Maps.
4. Run Now¶
| Result | Meaning |
|---|---|
| Succeeded — Initialized | First setup of the schema |
| Succeeded — Synchronized | Data was written |
| Succeeded — No changes | One-way only: the project version has not changed |
| Failed | Open Details |
One-way sync can end in Succeeded — No changes. Two-way runs Mergin Maps db-sync each time, so the outcome is Initialized or Synchronized, not “No changes”.
How change detection works¶
For one-way sync, GeoJibe checks whether the Mergin Maps project version changed.
- Changed → synchronize into PostGIS
- Unchanged → no data update required
Two-way sync always performs a sync cycle so edits can move in both directions. It uses the destination schema and a companion {schema}_base schema.
Reset and reinitialize¶
Reset synchronization state deletes GeoJibe's local sync files for the Job. It does not drop PostGIS schemas.
Reinitialize destination schema replaces data in the destination schema. For two-way Jobs it also replaces {schema}_base. Confirm by typing the schema name.
Deleting a Job does not drop those schemas.
Differences from QFieldCloud¶
| Mergin Maps | QFieldCloud | |
|---|---|---|
| Projects listed | Created and shared | Projects the CLI can list |
| Default URL | https://app.merginmaps.com/ |
https://app.qfield.cloud/api/v1/ |
| One-way | Yes | Yes |
| Two-way | Yes | No |
| “No changes” | One-way only | Yes |
Having trouble?¶
See Sync problems.