Move an existing database in

Copy a database from another host with pg_dump and pg_restore, or ask us to help with the move.

Updated November 17, 2026 · 1 min read · Managed Postgres: Getting started

The simplest way to move a PostgreSQL database in is a dump and restore.

Steps

  1. Create your Phluit database in the same or a newer PostgreSQL version than the old one.
  2. Add the address of the computer that runs the copy to Trusted sources.
  3. Make a dump of the old database:
    pg_dump --format=custom --no-owner --no-privileges "OLD-CONNECTION-STRING" -f mydb.dump
  4. Restore it into the new one:
    pg_restore --no-owner --no-privileges -d "NEW-CONNECTION-STRING" mydb.dump
    Use the connection string from the Connect tab (it includes sslmode=require). To restore into a new database, create it first with CREATE DATABASE and change the database name in the string.
  5. Point your app to the new host and password, then check it works before you switch off the old database.

Tips

  • Stop writes to the old database during the copy, or plan a short maintenance window, so nothing is lost.
  • --no-owner --no-privileges avoids errors about roles that don't exist on the new server.
  • Extensions the old database used must be supported here; pg_restore tells you if one isn't.

Prefer us to do it? Open a ticket and tell us where the database is now.

Was this article helpful?

Still need help?

Our team answers every request, usually within a few hours.

Contact Support

We use cookies to enhance your experience, provide live chat support, and analyze site traffic. By clicking "Accept", you consent to our use of cookies.

Cookie Policy
Accept