PostgreSQL: Backup and Restore DB

Posted . Visible to the public.

Backup:
$ pg_dump -U {user-name} {source_db} -f {dumpfilename.sql}

Restore:
$ psql -U {user-name} -d {desintation_db}-f {dumpfilename.sql}

Luis Romero
Posted by Luis Romero to Custom Exposure (2015-06-10 20:59)