scribase
Migration guide

Migrating only Supabase auth.users, not the whole project

Sometimes the database is fine where it is and only sign-in needs to move — a second environment, a split-off product, or a real migration off Supabase where the schema is being rebuilt by hand but logins have to keep working. Supabase's dashboard does not offer a dedicated "export just the users" button, so this is the manual path and the one-command path side by side.

Last checked November 18, 2026.

What's actually in auth.users

  • encrypted_password: a bcrypt hash, not the plaintext password. Anyone copying this table needs the hash to keep users logged in without forcing a reset.
  • id, email, phone, email_confirmed_at, phone_confirmed_at, last_sign_in_at, raw_app_meta_data, raw_user_meta_data: identity and profile fields your app likely joins against elsewhere by id.
  • auth.identities: separate rows for each linked OAuth/SSO provider per user, needed if you want "sign in with Google" to keep working for a migrated account.

Sources: Supabase: Connect to your database

The manual path

pg_dump the auth schema specifically with --schema=auth against the source project's connection string, then restore it into the destination with psql. This keeps password hashes intact, but any foreign keys your public schema tables hold against auth.users.id have to be re-pointed by hand, and the destination's own Postgres role/grant setup for the auth schema has to already exist and match.

Export, from the source projectsh
pg_dump --schema=auth --data-only \
  "postgres://postgres:<password>@db.<project-ref>.supabase.co:5432/postgres" \
  > auth-users.sql

The one-command path

scribase-migrate's Supabase source reads auth.users directly with the service role key and recreates each account on the destination with its password hash intact, so nobody resets a password — it moves storage buckets and the Postgres schema/data in the same run, which the manual pg_dump path above does not.

scribase-migrate, Supabase sourcesh
npx --yes git+https://rithub.dev/caelum0x/scribase-migrate.git supabase \
  --to <org>/<project> --create-project \
  --source-ref <project-ref> \
  --source-url "postgres://postgres:<password>@db.<project-ref>.supabase.co:5432/postgres" \
  --source-service-key "<service_role key>" \
  --verify-login-email you@example.com

Sources: Scribase pricing

FAQ

Questions people ask

Can I keep users logged in without forcing a password reset?

Yes, if the password hash (encrypted_password, a bcrypt hash) is carried over along with the row — both the manual pg_dump path and scribase-migrate preserve it, so a reset is not required on sign-in.

Does Supabase have a built-in "export just auth.users" button?

No. The dashboard does not offer a dedicated users-only export; pg_dump against the auth schema, or a third-party tool, is the real path.

What about linked OAuth accounts like "Sign in with Google"?

Those live in auth.identities, a separate table from auth.users — a users-only migration needs to carry that table too if linked sign-in should keep working for migrated accounts.

Does the destination need the exact same auth schema already set up?

For a plain pg_dump restore, yes — the destination's auth schema, roles and grants have to already match. scribase-migrate avoids this by creating accounts through its own API rather than restoring a raw schema dump.