Migration · By Rivtor · Updated
Migrate a Heroku Node.js app and PostgreSQL database
Translate the Heroku web, worker and release processes into explicit destination services, then rehearse PostgreSQL export and restore before moving traffic. Preserve configuration, add-on dependencies and a write-consistent cutover plan rather than treating the move as a source-code copy.
Compare Rivtor plans for your workload →
Translate the Procfile and add-ons
List each process and the directory where it starts. A web process needs a reachable listener; a worker usually needs private broker access rather than a public URL. Review the release command and any scheduler or add-on API the application assumes exists.
| Heroku input | Destination responsibility |
|---|---|
| web process | Node production start command and port |
| worker process | Separately supervised queue consumer |
| release command | Reviewed migration execution |
| Config vars | Private environment configuration |
| Add-ons | Verified replacement or retained external service |
Do not embed secret values in a migration document. Record names and a controlled transfer method. Check the pinned Node version and whether the destination installs the dependencies needed by the production build.
Rehearse the application before the data move
Deploy a destination copy using synthetic data. Exercise routes, email or object-storage integrations and worker jobs. On Rivtor, inspect service detection and identify any nonstandard start or migration command explicitly. Confirm a supported database import path and required privileges first.
Validate an export by restoring it
Inspect database version, extensions, roles and privileges. Rehearse the supported logical export/restore process into an empty disposable database. Verify critical records, sequences and migrations. Avoid a destructive restore command against a valuable database simply to see whether credentials work.
Database bytes are only part of the application state. Move durable files separately, and account for queued or in-flight tasks. A worker can keep writing even after the web app is placed into maintenance mode.
Schedule the final cutover
Define write freeze, final backup, import, validation and traffic change as separate steps with an owner. Use a short synthetic business transaction as an acceptance test. Keep the original environment available while confirming the destination.
Once new writes reach the destination, a rollback must address data divergence. Repointing DNS cannot preserve records created only on the new system. Keep that decision explicit and retire old resources only when recovery and retention requirements are met.