Restore PostgreSQL from Backup

Restore a PostgreSQL database from a pg_dump backup file.

Restores a PostgreSQL dump to a database. For .sql files use psql redirect; for pg_dump custom format use pg_restore. The target database must exist first.

When you need this: After a failed migration or when restoring from a backup on a new server.

Variables

Command


        
6 views 0 copies
Log in to rate
Log in to save

Free account. Save snippets into your own collections.