Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 526 Bytes

Restore.md

File metadata and controls

32 lines (23 loc) · 526 Bytes

Restore (Login as postgres user)

For Mac OS go to /Applications/Postgres.app/Contents/Versions/latest/Bin

./psql {database_name_to_backup} < /Users/Thirumal/Documents/{database_name_to_backup}.sql 

For Ubuntu, login with postgres user

sudo su postgres

Create database

psql
create {database_name};
\q

Syntax:-

psql -U {userName} {databaseName} < {backup-file}.sql

Example:-

psql -U postgres authorization-server < authorization-server.sql