I have a dump file with a .SQL
extension (in fact it is a plain-text SQL file). I want to restore it into my created databases. I am using pgAdmin III, and when I use its "Restore Wizard" it does not highlight the button "Restore". Instead it is expecting a .backup
file extension.
I tried using shell the commands for restoring the dump, but it still didn't work.
I am a newbie at this. If anybody could help me I would be obliged.
Edit
I used following command to the Shell SQL Pane of PostGres while sitting at the newTestDB.
newTestDB-# \i E:\db-rbl-restore-20120511_Dump-20120514.sql
It still gave the same error ("Permission Denied").
After elevating permissions it just shows me the default tables of PostgreSQL:
List of tablespaces
Name | Owner | Location
-----------+----------+----------
pg_default | postgres |
pg_global | postgres |
(2 rows)
I don't know what to do for importing/restoring database from an SQL file.
\dt+
instead of\db
. Normally, restoring a SQL dump doesn't create a new tablespace, unless you've told so. – Syd\
commands in apsql
session type\?
. – Syd