PostgreSQL

From Tom's notes
Revision as of 11:31, 26 June 2021 by Tom (talk | contribs) (Created page with "=Migrating all databases= On the old server: <source lang="sh"> su - postgres pg_dumpall > /tmp/pg-dump.sql </source> On the new server: <source lang="sh"> su - postgres psql...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Migrating all databases

On the old server:

su - postgres
pg_dumpall > /tmp/pg-dump.sql

On the new server:

su - postgres
psql -f /tmp/pg-dump.sql