Difference between revisions of "PostgreSQL"

From Tom's notes
Jump to navigation Jump to search
(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...")
 
(No difference)

Latest revision as of 11:31, 26 June 2021

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