Firebase backup guide
How to back up Firebase automatically
A practical guide to protecting Firestore collections, Realtime Database trees and Storage buckets against bad writes, deploy accidents and abusive clients.
Last updated
To back up Firebase automatically, connect your project to a dedicated backup service such as Backup247, pick a schedule (typically daily, hourly for busy Firestore collections), and let it snapshot every document, subcollection and Storage object to encrypted storage in the EU. When a Cloud Function bug runs a bad bulk write across thousands of Firestore documents, you restore the exact prior state from a point-in-time snapshot instead of relying on Google's opaque managed export files.
Why Firebase backups matter
Firebase runs the production data of many apps: user profiles, chat history, orders, IoT telemetry. Because most writes come from client SDKs and Cloud Functions, a single bad deploy can rewrite millions of documents in minutes, and Firestore itself has no undo.
A concrete scenario: a Cloud Function that normalises phone numbers is deployed with a regex that strips the leading digit for a subset of users. Within an hour the bulk write has touched every user document. Rolling forward with a corrective function is risky; a point-in-time Firestore snapshot from before the deploy is the safe path.
- Cloud Function bugs performing destructive bulk writes across collections.
- Malicious or compromised client SDKs deleting documents the security rules failed to protect.
- Accidental drops of a collection during a schema refactor.
- Storage bucket lifecycle rules that expire objects earlier than intended.
- GDPR right to erasure needing proof of what was stored on any given date.
What Firebase gives you natively
Firebase has managed exports and, on Firestore, point-in-time recovery for the last seven days. They cover the basics but leave real gaps.
Understand exactly what is and is not covered before you decide you do not need external backups:
- Firestore managed exports. Scheduled exports to Cloud Storage. Restore is all-or-nothing to a new database, not a single document or collection.
- Firestore PITR. Rolling seven-day window, restore to a new database only. No self-service row-level rollback.
- Realtime Database automated backups. Available on Blaze plans, JSON dumps to GCS. No PITR, no partial restore.
- Cloud Storage. Object versioning if you enable it, but no coordinated snapshot with Firestore.
None of these give you a single point-in-time snapshot spanning Firestore, RTDB and Storage, and none of them let you restore a single document or bucket path back into the live project.
Backup methods compared
| Method | Granularity | Retention | Restore effort |
|---|---|---|---|
| Firestore managed export | Whole database | As long as you pay for GCS | High: restore to a new database, migrate app config |
| Firestore PITR | Whole database | 7 days | Restore to a new database, no per-document |
| Custom Cloud Function | What you code | Your storage | You build the restore path yourself |
| Backup247 automated backup | Document, collection or bucket path | Up to 365 days | One-click point-in-time restore |
For any Firebase project serving real users, an automated backup with per-document restore is the only method that lets you recover from a bad write without downtime or data loss.
Set up automated Firebase backups
Connecting Firebase to Backup247 takes about ten minutes. It uses a service account with read-only scopes on the collections and buckets you want to protect.
Create your Backup247 account
Start the 14-day trial from the sign up page. No card required.
Add a service account
Create a read-only service account in the Google Cloud console and paste the JSON key into the Firebase connector.
Scope the connector
Pick which Firestore collections, RTDB paths and Storage buckets are in scope. Everything else is ignored.
Pick a schedule
Daily is the default. Increase to hourly for busy collections such as orders or messages.
Set retention
Choose how long snapshots are kept, up to 365 days, independent of your Firebase billing plan.
Verify the first snapshot
Once the first run completes, browse the snapshot to confirm documents and storage objects are captured before you rely on it.
See the connector details on the Firebase integration page, or compare plans on pricing.
How restore works
Restore is where Firebase's own tooling falls short. Backup247 gives you three restore paths, all from the same snapshot browser:
- Single document. Preview a historical version of a Firestore document and restore just that document. IDs and subcollections are preserved.
- Collection or path. Restore an entire collection or RTDB path to a chosen point in time. Diffs let you accept or reject each change.
- Bucket object. Restore Storage objects by path and version, without disturbing sibling objects.
Firebase backup checklist
- Daily automated snapshot of every Firestore collection, RTDB path and Storage bucket that matters.
- Hourly snapshots for high-write collections such as orders, messages or telemetry.
- Retention of at least 90 days, longer if you have compliance obligations.
- Backup storage in the EU with encryption at rest and a DPA on file.
- Alerts when a scheduled backup fails or when document counts drop unexpectedly.
- A restore drill every quarter: pick a random document, restore it, confirm the payload matches.
- Rotation of the service account key at least once a year.
Frequently asked questions
Does Firebase have automatic backups?+
Firestore has managed exports and a 7-day PITR window, both of which restore only to a new database. Backup247 adds per-document and per-collection restore back into the live project, plus longer retention.
How often should I back up Firestore?+
Daily is enough for most projects. Move to hourly for high-churn collections such as orders, chats or telemetry.
Can I restore a single Firestore document?+
Yes. Browse the snapshot, preview the document and restore just that document back into the live database. IDs and subcollections are preserved.
Does it also cover Realtime Database and Storage?+
Yes. You can back up Firestore, RTDB and Storage in the same schedule and restore each independently.
Where is my Firebase backup data stored?+
Encrypted at rest in the EU (Frankfurt), independent of your Firebase project region. A DPA and sub-processor list are available on request.
What permissions does the connector need?+
A read-only service account scoped to the collections and buckets you choose. No write access is required for backups.
Protect your Firebase project
Start a 14-day trial and take your first Firestore snapshot in minutes. No card required.
