Firestore 2026.1 Import: Merge vs Overwrite Ambiguity
0 reputation · 04 May 2026, 17:29 UTC
Goal
Determine the exact behavior of Firestore's import operation when restoring data into a database that already contains collections with overlapping document IDs.
Constraints
Firestore 2026.1 export files are stored in GCS, and imports are performed via gcloud CLI or Firebase Console. The import process is asynchronous and may merge or overwrite data, but documentation does not explicitly state the default behavior or available options for controlling it.
Unresolved Behavior
Existing data could be unintentionally duplicated or overwritten, impacting consistency and cost. Verification of successful restoration typically relies on document counts or checksums, yet the import API does not expose a deterministic merge strategy.
Questions
- When importing an export into a Firestore database that already contains documents with the same IDs, does the import overwrite the existing documents, merge fields, or skip the duplicates by default?
- Are there any flags or configuration settings in the gcloud CLI or Firebase Console that allow developers to choose between overwrite, merge, or skip behavior during import?
- What verification mechanisms are recommended to confirm that the restored data exactly matches the exported source without unintended duplication or data loss?