How to Backup Firebase Database: Step-by-Step Guide
Complete guide on backing up Firebase Realtime Database and Firestore. Learn how to export, schedule, and restore your Firebase data with Database Vault.

Why Backup Firebase Databases?
Firebase provides excellent real-time database capabilities, but it's crucial to have backups for disaster recovery, data migration, and compliance. Whether you're using Firestore or Realtime Database, regular backups protect your application data.
How to Backup Firebase with Database Vault
Step 1: Get Your Firebase Connection Details
To backup Firebase, you'll need your Firebase project credentials:
For Firestore:
- Go to Firebase Console → Project Settings → Service Accounts
- Generate a new private key (JSON file)
- Or use your Firebase project ID and credentials
For Realtime Database:
- Get your database URL from Firebase Console
- Format:
https://your-project.firebaseio.com - Generate a database secret or use OAuth token

Step 2: Add Firebase to Database Vault
In Database Vault, click "Add Database" and select "Firebase" as the database type.

Required Information:
- Database Name: A friendly name for your Firebase project
- Connection String: Your Firebase database URL or service account JSON
- Database Type: Select "Firebase" or "Firestore"
- Backup Interval: Choose how often to backup (daily recommended)
Step 3: Configure Backup Schedule
Set up automated backups. For Firebase, we recommend daily backups to ensure you have recent snapshots of your data.

Firebase Backup Best Practices
Backup Both Firestore and Realtime Database
If your app uses both, create separate backup configurations for each database type.
Use Service Account Credentials
Service account JSON files provide secure, programmatic access to your Firebase data.
Test Restore Procedures
Regularly test restoring Firebase backups to ensure they work correctly.