Sarvesh Pandey
Sarvesh Pandey

Reputation: 51

How to restore .dump or .sql on Azure PostgreSQL Server

I already have .dump and .sql but I am unable to restore it. I used pgAdmin, i can see the tables but there are no data in it.Same thing in Azure Studio and Navicat. I use "pg_restore" to restore the file but it doesn't throw any error.

Upvotes: 0

Views: 1174

Answers (1)

user13389888
user13389888

Reputation:

The Right way to take a dump with data and restore is

./pg_dump -U postgres -p 5432 -h <remote_IP> -Ft dbname_source > dump_of_source.sql.tar 
./pg_restore -U postgres -h localhost -p 5432 -d dbname_target dump_of_source.sql.tar

Upvotes: 0

Related Questions