postgres backup restore backup pg_dump dbname > file.sql restore drop and recreate target db first cat file.sql | psql -h host -U postgres dbname