Migration guide

Move from PocketBase to DBlob.

Bring your collections, records, passwords and uploaded files into a fresh DBlob instance. Try the move on a backup first so you can check the result alongside your running app.

Compare DBlob and PocketBase

Prepare a snapshot

Download a backup from Settings → Backups in PocketBase and extract it. For the commands below, put data.db and the storage/ directory inside ./pb_snapshot/. If you copy a live installation by hand, stop PocketBase for the copy so records and uploads match. PocketBase backup instructions.

If your uploads live in S3, copy the objects separately into pb_snapshot/storage/, preserving their collection, record and filename paths.

Run the import locally

Choose a new destination directory. The importer reads the snapshot and creates a DBlob SQLite project. After it finishes, create your DBlob administrator and start the server on a spare local port.

Terminal
dblob import pocketbase ./pb_snapshot --dir ./dblob_trial
dblob superuser create you@example.com --dir ./dblob_trial
dblob serve --http 127.0.0.1:8091 --dir ./dblob_trial

Supply a new administrator password when running the second command. Open http://127.0.0.1:8091/_/ and sign in.

Review the import report

Open dblob_trial/import-report.md and compare collection counts with your source. Pick a record with relations and an upload, then follow both in the admin.

  • IDs and files. Standard PocketBase record IDs carry over. The report maps replacement IDs for incompatible custom IDs and lists missing files. Check external links or integrations that store those IDs.
  • Sign-in. Imported email accounts keep their passwords. Users sign in again to establish a DBlob session. Review skipped username-only accounts, OAuth links and MFA enrollment before inviting users back.
  • Schema and application code. Review skipped indexes, field options and view SQL. Recreate the views and port any hooks or Go extensions your application uses.

Recreate access rules

Imported collections start private. The report includes the original PocketBase rules for each collection. Use them to decide who may read, create, update and delete records.

For example, if both the PocketBase list and view rules on posts allow only the signed-in author to read a post, express that policy in DBlob with a row grant.

DBlob grant
GRANT SELECT ON posts TO authenticated WHERE author = @auth.id

Test with two accounts and a signed-out browser. The author should see their own post, while the second account and guest should be denied. Repeat for writes and protected fields. DBlob grants and roles.

Switch your app

Adapt the client to DBlob’s record queries, authentication and realtime API. Test the flows your users rely on, including signing in, opening existing files and saving a record. DBlob API examples.

For the final move, pause writes to PocketBase, take a fresh snapshot and import into a new directory. Reapply the grants and setup you verified in the trial. Check the final report and record counts before switching traffic. Keep the original backup, and send writes to only one backend during the switch.