Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. # Export Postgres Database schema using pgAdmin 4 on Mac OS X (using SSH Tunneling)
  2.  
  3. Assuming the SSH tunnel has been previously created.i.e.
  4.  
  5. ```
  6. ssh -f server-user@hostname -L 54329:localhost:5432 -N
  7. ```
  8.  
  9. The schema can be exported as follows:
  10.  
  11. ```
  12. /Applications/pgAdmin 4.app/Contents/SharedSupport/pg_dump --file "/path/to/export/file.sql" --host "localhost" --port "54329" --username "dbuser" --no-password --verbose --format=p --schema-only "dbname"
  13. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement