← All playbooks
Backend migration

Firebase → Supabase

Move Firestore data, Authentication, Storage, security rules, Cloud Functions, triggers, indexes, realtime behavior, hosting dependencies, analytics hooks, and application clients into a relational Supabase architecture.

Typical timeline20–45 business days100–190 hours active work
Statusneeds review
Source testedFirebase documentation reviewed 2026-07-19
Destination testedSupabase documentation reviewed 2026-07-19
Last reviewed2026-07-19
Sources3
Before you migrate

Should you make this move?

Both platforms have a case. Compare what you gain with what you give up before scheduling the cutover.

Current platform

Firebase

Reasons to stay
  • Authentication, realtime data, hosting, and mobile tooling enable very fast product delivery
  • Managed infrastructure removes a large amount of operational work
Reasons to leave
  • NoSQL modeling, usage-based costs, and Google-specific APIs can be difficult to unwind
  • Platform-specific services can create architectural lock-in
New platform

Supabase

What gets better
  • PostgreSQL, authentication, storage, realtime, and edge functions offer an open backend stack
  • Managed infrastructure removes a large amount of operational work
What gets worse
  • Production scaling and service integration still demand database and infrastructure judgment
  • Platform-specific services can create architectural lock-in
Best of the move

Supabase: PostgreSQL, authentication, storage, realtime, and edge functions offer an open backend stack. This removes a major source-side concern: NoSQL modeling, usage-based costs, and Google-specific APIs can be difficult to unwind.

Worst of the move

What you lose: Authentication, realtime data, hosting, and mobile tooling enable very fast product delivery. What you inherit: Production scaling and service integration still demand database and infrastructure judgment.

01At a glance

Know the shape of the move.

Transfer outcome12 features audited
Transfer outcome distributionClean transfer: 0, Partial transfer: 7, Manual rebuild: 4, Not transferred: 1.
Clean0
Partial7
Manual4
Lost1
Mapping route9 of 9 fields have a destination path

This timeline assumes

  • Up to 100 Firestore collections, one million documents, 100,000 users, and 100 GB of files
  • Application owners can ship coordinated client and server releases.
  • A production-shaped dataset and identity cohort are available for rehearsal.
  • The source remains authoritative until final consistency and security checks pass.
  • The migration team records evidence for every blocking verification check.
02Loss matrix

What survives the move.

“Partial” and “manual” are not footnotes. They are work that must be scheduled and verified.

ItemOutcomeImpactWhat happensMitigation
Firestore collections and nested documentspartialcriticalSupabase’s tool copies one collection to one Postgres table and flattens values into basic columns or JSONB.Design a relational schema and stable keys before transforming each collection.
Firebase Authentication users and sessionspartialcriticalApps can retain Firebase as third-party auth or migrate users separately; token and password behavior require an explicit strategy.Choose coexistence, rolling migration, or forced reauthentication and test every provider.
Firebase security rulesmanualcriticalFirestore and Storage rules do not become Postgres Row Level Security policies.Translate each rule into tested RLS and storage policies before client traffic.
Cloud Functions, triggers, offline sync, and realtime listenersmanualcriticalExecution and client consistency models differ between Firebase and Supabase.Port functions and rewrite client data access with concurrency, retry, and offline behavior tests.
Primary application datapartialcriticalRecords can move while source and destination data models, types, identifiers, and constraints differ.Design the target schema and preserve stable source IDs.
Nested data and relationshipspartialcriticalDocument nesting, references, joins, and cascade behavior require explicit transformation.Model relationships and verify orphan, duplicate, and cascade behavior.
Authentication userspartialcriticalAccounts may move while password hashes, providers, MFA, verification, and sessions require separate handling.Choose a supported rolling or one-off identity strategy.
Authorization and security rulesmanualcriticalSource rules do not execute as destination database or storage policy.Translate into least-privilege policies and test every role.
File and object storagepartialcriticalObjects, metadata, signed URLs, paths, and access policies require separate copying.Copy with checksums and verify authorized and anonymous access.
Serverless functions and triggersmanualcriticalRuntime APIs, triggers, regions, retries, and secrets differ.Port and integration-test every function and failure path.
Realtime subscriptionspartialhighEvent ordering, payloads, filters, reconnects, and delivery guarantees differ.Rewrite clients and test concurrency, disconnect, and replay behavior.
Offline behavior and local cachelosthighSource client SDK persistence does not automatically exist in the destination stack.Choose and test an explicit offline and conflict strategy.
03Field and feature mapping

Where each thing goes.

SourceDestinationMethodNotes
Firebase projectSupabase projectmanualRecord regions, environments, owners, and billing.
Collection, document, or recordDestination table and rowtransformPreserve source IDs and types.
Nested object or referenceColumn, JSON, or relationtransformChoose explicit relational semantics.
Authentication userDestination auth user or federated identitytransformPreserve verification and provider identifiers where supported.
Security ruleDestination authorization policymanualTranslate and test every role and path.
Storage objectDestination storage objecttransformPreserve path, metadata, checksum, and access.
Function or triggerDestination function, hook, or scheduled jobmanualPort retries, idempotency, and secrets.
Realtime listenerDestination subscriptiontransformRewrite payload and reconnect handling.
Index and queryDestination index and querymanualBenchmark production-shaped workloads.
04Before you begin

Make the move recoverable.

Backup procedure

Create the source-of-truth backup

Preserve Firebase data, configuration, and operating evidence before any destination write.

  1. Export Firebase data, schema, identities, security rules, storage, functions, indexes, configuration, and logs.
  2. Record counts, checksums, sizes, auth states, policies, and query baselines.
  3. Capture client versions, SDK configuration, integrations, backups, and recovery procedures.
  4. Hash raw exports and transform working copies only.

Proof to capture: A signed manifest reconciles every scoped record class, runtime dependency, export file, count, and hash.

Transformation · Schema migration and ETL tools

Target schema and identity map

Translate records, relationships, users, and stable IDs.

  1. Inventory source values and exceptions.
  2. Define explicit destination mappings.
  3. Reject unmapped critical records.

Proof to capture: Save the input, output, command or tool settings, warnings, and final item counts.

Transformation · Policy tests, feature flags, and integration suite

Policy and client compatibility layer

Preserve authorization and support controlled client rollout.

  1. Normalize encoding, dates, identifiers, and blanks.
  2. Run a representative pilot.
  3. Reconcile accepted, rejected, and transformed rows.

Proof to capture: Save the input, output, command or tool settings, warnings, and final item counts.

05Handle with care

The things most likely to hurt.

These are operating limits. Treat every “Stop if” condition as a blocked migration, not a suggestion.

Transform

Data-model transformation changes meaning

criticalpossible likelihood

Nested values, identifiers, timestamps, or relationships differ after import.

Consequence
Applications read incorrect or incomplete data.
Mitigation
Use deterministic transforms and record-level reconciliation.

Stop if: Any critical invariant fails.

Security

Authorization is weaker than the source

criticalpossible likelihood

A destination role can read or write unauthorized rows or objects.

Consequence
Sensitive data is exposed or changed.
Mitigation
Default-deny and test every policy with real client identities.

Stop if: Any unauthorized operation succeeds.

Cutover

Old and new backends both accept writes

criticalpossible likelihood

Client versions or triggers write to different systems.

Consequence
Data diverges permanently.
Mitigation
Use version gates, a write freeze, or an approved dual-write reconciliation design.

Stop if: Unreconciled writes appear in either system.

06Precise timeline

Do the work in this order.

Estimate forUp to 100 Firestore collections, one million documents, 100,000 users, and 100 GB of files
Total elapsed20–45 business days
Active work100–190 hours
BufferAdd time for deeply nested Firestore data, many auth providers, offline-first clients, Functions, large Storage, or strict zero-downtime needs.
01
Days 1–3Inventory and decisions2–3 days
02
Days 3–5Backup and reconcile1–3 days
03
Days 5–12Map and pilot3–8 days
04
Days 10–20Final delta and switch1–5 days
05
Days 12–40Observe and close3–10 days
  1. Days 1–3 · inventory

    Inventory and decisions

    6–12 hours active2–3 days elapsedOwner review waiting
    • Inventory Firebase data, features, users, domains, and integrations.
    • Approve scope, owners, mappings, and exclusions.

    Depends on: Firebase and Supabase administrator access

    Stop / go checkpoint

    Export?

    Go when: Every critical item has an owner and disposition.

    Stop when: Consent, billing, access, or system ownership is unclear.

  2. Days 3–5 · backup

    Backup and reconcile

    5–10 hours active1–3 days elapsedExport processing waiting
    • Create immutable exports and configuration evidence.
    • Reconcile counts, totals, and hashes.

    Depends on: Approved inventory

    Stop / go checkpoint

    Transform?

    Go when: Source totals and export manifests agree.

    Stop when: Any critical dataset or configuration is absent.

  3. Days 5–12 · pilot

    Map and pilot

    10–35 hours active3–8 days elapsedDestination processing and review waiting
    • Configure Supabase and transform representative data.
    • Run a pilot containing normal records and every critical edge case.

    Depends on: Verified backup

    Stop / go checkpoint

    Scale?

    Go when: Pilot mappings, behavior, access, and evidence pass.

    Stop when: Any critical check fails or produces unexplained variance.

  4. Days 10–20 · cutover

    Final delta and switch

    5–25 hours active1–5 days elapsedDNS, import, or sync propagation waiting
    • Freeze production writes in Firebase.
    • Apply the final delta, switch ownership, and run blocking checks.

    Depends on: Passed pilot and approved rollback

    Stop / go checkpoint

    Open production?

    Go when: Counts reconcile and one destination system owns production.

    Stop when: A source writer remains active or a blocking check fails.

  5. Days 12–40 · observe

    Observe and close

    3–18 hours active3–10 days elapsedOperating-cycle evidence waiting
    • Monitor one complete operating cycle.
    • Sign the verification report and close rollback only after stability.

    Depends on: Verified cutover

    Stop / go checkpoint

    Close rollback?

    Go when: No trigger occurs during the agreed observation period.

    Stop when: Data, access, delivery, routing, or business results regress.

07The point of change

Cut over with a way back.

Go live

Cutover

Make Supabase the only production system without losing the final Firebase delta.

Recommended window: A low-volume weekday morning with platform, data, DNS, and business owners available.

  1. Freeze production writes and scheduled actions in Firebase.
  2. Export, transform, and reconcile the final delta.
  3. Apply the approved delta to Supabase.
  4. Switch domains, forms, integrations, sending, or sync ownership as applicable.
  5. Run every blocking verification check and keep the source intact.

Proof to capture: Supabase owns production, totals reconcile, and every blocking check has durable evidence.

Return to safety

Rollback

Return production ownership to Firebase without losing destination-era changes.

Deadline: Within seven days and before source data, plans, credentials, domains, or billing are changed.

  1. Stop new writes and scheduled actions in Supabase.
  2. Restore the prior Firebase routing, forms, integrations, sending, or sync ownership.
  3. Export the Supabase post-cutover delta.
  4. Review and apply safe destination-era changes to Firebase.
  5. Run the same blocking checks against the restored source.

Proof to capture: Firebase again owns production with current data and no duplicate destination action.

Rollback immediately when
  • Unexplained critical count or value variance
  • Missing or exposed critical data
  • Duplicate production action
  • Failed access, routing, delivery, or integration check
  • A critical feature has no safe destination replacement
08Verification report

Prove the migration worked.

Every blocking check must pass. Capture the evidence before cleanup begins.

0%
Interactive report preview0 / 8 checks passed
PassIDCheckMethodExpected resultEvidence
V-01BlockingRecord reconciliationCompare counts, checksums, aggregates, and stratified records.Every scoped record is accounted for.Data ledger.
V-02BlockingTypes and relationshipsTest constraints, identifiers, nulls, dates, arrays, and cascades.All critical invariants hold.Schema report.
V-03BlockingAuthentication statesTest every provider, verification, reset, MFA, and session path.Users can authenticate only as approved.Auth matrix.
V-04BlockingData and storage policyRun allowed and denied operations for every role.Every policy defaults and resolves correctly.Policy test report.
V-05BlockingObject coverageCompare paths, sizes, hashes, metadata, and signed access.Every required object is durable and correctly protected.Storage manifest.
V-06BlockingTriggers and side effectsRun success, retry, timeout, duplicate, and failure cases.Idempotent approved outcomes.Function log.
V-07BlockingQuery, realtime, and offline behaviorRun supported client versions through representative workloads.Correct reads, writes, events, and recovery.Client matrix.
V-08BlockingBackup and rollbackRestore a destination backup and execute the rollback rehearsal.Recovery objectives and integrity pass.Recovery report.
09Post-migration cleanup

Remove the scaffolding safely.

Safe after: One complete operating cycle, at least seven stable days, and owner sign-off on every blocking check.

  1. Create final Firebase exports and archive verification evidence.
  2. Revoke temporary credentials, API keys, webhooks, and elevated roles.
  3. Remove obsolete embeds, forms, jobs, integrations, and DNS records.
  4. Keep the source intact through the approved retention window.
  5. Cancel paid plans only after billing, legal, and recovery review.
  6. Schedule the next Supabase backup, access, and migration-playbook review.
10Experiences from the field

When the plan met reality.

First-hand accounts are preferred. Vendor case studies are labeled, and every note below is an editorial paraphrase—follow the link for the full context.

First-person accountDEV Community

How I migrated from Firebase to Supabase

The creator of UnwindHR moved authentication, Firestore data, storage, and application code to Supabase during a planned weekend outage. The author designed relational schemas first, refactored and tested before cutover, then took a final Firebase snapshot. Passwords and original user IDs did not transfer through the chosen auth path, and nested Firestore collections required a custom JSON export and transformation script.

What they recommend
  • Design the relational schema and refactor application queries before taking the final production snapshot.
  • Plan explicitly for password resets and preserve legacy Firebase IDs in temporary mapping columns where references may remain.
Worth noticing
  • Top-level export tooling was insufficient for nested Firestore collections, so custom traversal and splitting were required.
  • A short maintenance window simplified consistency, but only because most conversion work had already been rehearsed.

The Fleeting Notes creator describes moving more than 1,000 users while preserving a live service and user-specific data such as Stripe customer references and encryption keys. Rather than treating the database copy as the whole job, the migration used application logic and database webhooks to retrieve legacy Firebase values when users crossed into the new system.

What they recommend
  • Identify identity-linked secrets and billing references that need a controlled handoff, not just a bulk database copy.
  • Test the first-login path for existing users because lazy migration logic becomes part of the production cutover.
Worth noticing
  • A seamless user transition required coordination between authentication, billing identifiers, encrypted data, and database triggers.
  • Keeping targeted access to legacy Firebase data reduced the need for a single high-risk all-at-once conversion.
Sources and maintenance

Built to be reviewed.

Tested 2026-07-19. Next scheduled review: 2026-10-19.

  1. Supabase: migrate Firestore dataAccessed 2026-07-19
  2. Supabase: use Firebase AuthAccessed 2026-07-19
  3. Supabase: migration guidesAccessed 2026-07-19