Aurabase Logo
aurabasedocs
docs›Guides›Supabase Migration

Migrate from Supabase

pg_dump + aura import + regen types. An average migration takes 1 hour for a medium-sized project (10-50 tables, ~1 GB of data).

10 min read·Level intermediate·Revised on Apr 15, 2026
This English text was generated automatically from the French original and has not been reviewed yet.
#
Compatibility

95% same as Supabase

Aurabase was born from the desire of Supabase, with some engineering fixes. The client API, the RLS policies, the auth model, the storage — everything is designed so that the migration is trivial.

FeatureCompatibilityNote

createClient()SameImport @aurabase/aurabase-js instead of @supabase/supabase-js

.from().select()Same Same PostgREST chainable API

RLS policiesSamePostgres SQL Policies — copy/paste

auth.uid() / auth.role()Same as claim-to-claim compatible Helpers

.rpc()SameSame signature for Postgres functions

.storage.from().upload()Same S3-compatible API, identical path

.channel().on("postgres_changes")Same Same CDC surface

Edge Functions (Deno)Same Standard Deno Runtime — Deno.serve() compatible without rewriting

Auth hooksMinor diffHTTP webhooks and dedicated endpoints

Service role keySame Same role, same scope

#
Steps

Five phases, in order

  1. Schema — dump + import SQL (5 min)
  2. Data — copy of rows per table (variable depending on volume)
  3. Auth — export users with Argon2id hashes (10 min)
  4. Edge Functions — direct Deno.serve() deployment without modification (10 min)
  5. Cutover — DNS + keys toggle (5 min)
#
Data

pg_dump + aura import

migrate-data.shbash
# 1. Dump from Supabase (without system schemas)
pg_dump "$SUPABASE_DB_URL" \
  --schema=public \
  --no-owner --no-acl \
  -f schema.sql

# 2. Import into Aurabase (service_role key)
aura db restore schema.sql --env prod --confirm

# 3. Regenerate TypeScript types
aura db generate > src/aurabase.types.ts
Astuce

For databases > 10 GB, use aura db restore --parallel 8 — copy streaming with 8 concurrent workers. Typical: 50 GB in ~25 min.

#
Auth

Export users + preserved hashes

Both Supabase and Aurabase use Argon2id. The hashes pass as is — your users log in without password reset.

migrate-users.shbash
# Export from Supabase (requires service_role_key)
aura migrate export-supabase \
  --url $SUPABASE_URL \
  --service-key $SUPABASE_SERVICE_ROLE \
  --output users.jsonl

# Import into Aurabase (hashed passwords preserved)
aura auth import users.jsonl --env prod

# → 380,412 users imported in 24s · MFA factors preserved
#
Edge Functions

Native Deno — zero rewrites

Aurabase runs a standard Deno runtime. Your functions using Deno.serve() are 100% compatible without modification:

functions/hello.tstypescript
// Standard Deno function — works as is on Aurabase
Deno.serve(async (req) => {
  const { name } = await req.json()
  return new Response(
    JSON.stringify({ message: `Hello ${name}!` }),
    { headers: { 'content-type': 'application/json' } }
  )
})
Last updated · Apr 15, 2026