Copy Production Data
Copy documents from a production Firestore collection into the local emulator for testing.
Overview
The Copy Production Data feature lets you transfer Firestore documents from a production (or staging) connection into your local emulator. This gives you realistic test data without manually creating fixtures or writing seed scripts.
How to Copy
- Click Copy from Production in the emulator panel.
- Select a source connection — choose a production or staging connection from your saved connections.
- Select a collection from the source project.
- Optionally set a document limit to copy only a subset of documents (leave empty to copy all).
- Choose a conflict strategy for handling documents that already exist in the emulator:
- Skip — keep existing emulator documents, only add new ones
- Overwrite — replace existing emulator documents with production data
- Click Copy to start the transfer.
Progress Tracking
During the copy operation, Stackpane shows:
- The number of documents copied so far
- The number of documents skipped (when using the Skip conflict strategy)
- A progress indicator for the overall operation
Use Cases
Bug Reproduction
When a user reports a bug with specific data, copy their collection from production into the emulator to reproduce the issue in a safe local environment.
Performance Testing
Copy a representative sample of production data to test how your application handles real-world data volumes and patterns.
Development Workflow
Start development with real data structures and values instead of synthetic test data, catching edge cases that artificial data might miss.
Source Selection
The source connection picker shows all your saved connections except emulator connections. You can copy from:
- Production connections — your live Firebase project
- Staging connections — a separate staging project
The source connection must have read access to Firestore for the copy to succeed.
Document Limits
Setting a document limit is recommended for large collections to keep the copy operation fast:
- Copy the first N documents based on the default ordering
- Useful for sampling production data without copying the entire collection
- Leave empty to copy all documents (may take time for large collections)
Safety Considerations
- This operation only reads from production — it never writes to or modifies production data
- Data is written to the local emulator only
- Production credentials are used for reading but the data stays on your machine
- Consider data privacy implications when copying production data that may contain user information