Guest User

Untitled

a guest
Feb 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. # PostgreSQL restore database from plain text dump
  2.  
  3. Connect to PostgreSQL console:
  4.  
  5. `psql`
  6.  
  7. Create the target database if it does not already exist
  8.  
  9. `CREATE DATABASE [target_db];`
  10.  
  11. Connect to target database
  12.  
  13. `\connect [target_db]`
  14.  
  15. Restore the database
  16.  
  17. `\i path/to/plain_text_dump.sql`
Add Comment
Please, Sign In to add comment