ZEABUR / MIGRATION

How to Migrate from Zeabur to KamuiDash: Web App and PostgreSQL

Back up your database, test the new deployment, then switch traffic.

If your Zeabur project runs a web app from GitHub and one PostgreSQL database, start by taking a backup you can restore. Then deploy the app to a temporary KamuiDash URL and test it with a separate database before you move your domain.

Zeabur recommends completing migration by November 30, 2026. Its shutdown notice says shared-cluster services will be suspended from December 1 and can be manually resumed to back up data. Check your own expiry date if you use a dedicated server. Download a copy of your data while you still have access.

This guide covers one HTTP web app and one PostgreSQL database. Plan separate migrations for mounted volumes, object storage, Redis, workers and scheduled jobs. The steps are based on the providers’ documentation; this guide does not report a verified end-to-end cloud migration.

Choose Pro for the PostgreSQL restore in this guide. The CLI tunnel needs external database access. If the rehearsal and cutover databases run at the same time, both accrue base charges by the minute. See KamuiDash pricing. You can download your Zeabur backup before setting up the KamuiDash project.

1. Inventory the app and rehearse the deployment

2. Export the database from Zeabur

If you suspect the source database was compromised, do not restore the dump as-is. Check for unexpected roles, functions, triggers, scheduled jobs and extensions. An archive listing does not show the SQL the restore will execute; use pg_restore --file to generate SQL for review without connecting to a database, as described in the PostgreSQL restore documentation. If you cannot trust the dump, rebuild from a known-good schema and import only vetted data into the new database.

If you can connect to the source database

Prefer a custom-format backup of just the app’s database. Use an authorized connection that can read every object the app needs, and configure a local libpq connection service named zeabur-source with the source host, port, database, user and appropriate TLS settings. Verify the database name before exporting. Use a pg_dump client at least as new as the source server and check compatibility with the target PostgreSQL version and extensions.

Terminal
umask 077
psql -X 'service=zeabur-source' -c 'SELECT current_database(), version();'
pg_dump --dbname='service=zeabur-source' \
  --format=custom --file=zeabur-app.dump
pg_restore --list zeabur-app.dump

If all you have is Zeabur’s online backup

Zeabur’s backup documentation says its PostgreSQL online backup on supported paid plans is a plain .sql produced by pg_dumpall. It can contain multiple databases and cluster-wide roles. Do not run pg_restore on this file or execute it directly against the managed target.

Restore a trusted copy with psql on a fresh, isolated PostgreSQL instance you control, with compatible versions and extensions. Review the SQL first: the cluster restore may create roles and databases, and it may need administrator privileges. Resolve any role or database name collisions there, then run pg_dump --format=custom against just the app database on that isolated instance. Check that the expected tables and records are present. Keep both the SQL and the new archive private.

3. Restore to an empty KamuiDash database

Use the KamuiDash CLI database tunnel (external database access requires Pro; check the current pricing and plan details). Run kamui login, then kamui db connect 'YOUR_PROJECT/YOUR_DATABASE' to initialize external access, setting an external password if prompted. Exit the interactive session with \q. Check kamui db daemon status and run kamui db daemon start if needed. Set up a local connection service called kamui-migration-target with the target’s external database name and user, local tunnel port and CA certificate. The connection service example shows the TLS settings; keep TLS verification enabled.

Verify the target and identify the app role using SELECT current_user; over the new app’s internal database connection. Replace YOUR_APP_DB_ROLE below. The external user must be allowed to switch into that role. If the check fails, stop and verify the target permissions before restoring.

Terminal
export KAMUI_APP_DB_ROLE='YOUR_APP_DB_ROLE'
psql -X 'service=kamui-migration-target' -W -v ON_ERROR_STOP=1 \
  -v "app_role=$KAMUI_APP_DB_ROLE" <<'SQL'
SELECT current_database(), current_user, version();
SET ROLE :"app_role";
SELECT current_user;
SQL

Continue only after you confirm the target database is empty and the check shows the expected database and application role.

Terminal
pg_restore --dbname='service=kamui-migration-target' -W \
  --role="$KAMUI_APP_DB_ROLE" --no-owner --no-privileges \
  --exit-on-error --single-transaction zeabur-app.dump

The archive is restored without source ownership or grants. Reapply any permissions your app needs on the new database and verify it can use the restored tables and sequences. See the PostgreSQL manuals for pg_dump, pg_dumpall and pg_restore.

4. Verify the new URL and switch the domain

  1. On the rehearsal URL, check the app can load, sign in, and create and update a test record. Compare counts for key tables, check recent records and try a write that uses a database-generated ID. Check uploaded files separately.
  2. Before the maintenance window, create a separate empty cutover database and check that you can connect to that exact database through the CLI tunnel. Keep the app pointed at the rehearsal database for now.
  3. During the maintenance window, stop writes on Zeabur, including jobs and webhooks. Take a fresh backup, restore it into the prepared cutover database and point the new app at it. Verify the connection and run read-only checks while old writes are still paused.
  4. Follow the custom domain guide and check DNS and HTTPS. Enable writes and move jobs and callbacks to the new app once the new route is healthy. Keep the source and a protected backup until you have verified the cutover, subject to Zeabur’s own expiry schedule.

Keep the old database read-only during the switch. Once writes land in KamuiDash, pointing DNS back at Zeabur alone would omit those writes. Decide how to reconcile them before rolling back.

Deploy your GitHub app on KamuiDash →