PostgreSQL simple backup and restore

To backup in verbose text format (from Windows/DOS command line):

pg_dump -C -f backupfile.sql -h localhost -p 5433 -U postgres databasename

To restore backup in verbose text format (from Windows/DOS command line):

psql -f backupfile.sql -U postgres -h localhost -p 5433

Comments

Find out more