Re: Restoring from SQL dump

From: Payal Singh <payal(at)omniti(dot)com>
To: Erin Jonaitis <jonaitis(at)wisc(dot)edu>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Restoring from SQL dump
Date: 2013-10-18 14:12:21
Message-ID: CANUg7LA-JYv=b7UK7HrC52m2cXYcmVHzAaExxUBX9Bdbmne4pw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hey,

I haven't tried it on Windows but most probably you need to issue that
command from the command prompt/terminal, not when you're within psql. Log
in as a superuser and give that command with the qualified psql path.

Payal Singh,
OmniTi Computer Consulting Inc.
Junior Database Architect,
Phone: 240.646.0770 x 253

On Fri, Oct 18, 2013 at 9:57 AM, Erin Jonaitis <jonaitis(at)wisc(dot)edu> wrote:

> Hello!
>
> I am trying to restore data from an SQL dump. I am using Windows 7,
> PostgreSQL version 9.3, pgAdmin III 1.18.0.****
>
> ** **
>
> Here is what I did.****
>
> ** **
>
> **1) **I used the pgAdmin III interface to create a new database.****
>
> **2) **I selected this db in the console and selected Plugins > PSQL
> console.****
>
> **3) **Now I have a psql window open with the following prompt:
> dbname=#****
>
> **4) **I tried typing the following:
> psql –f M:\LongitudinalDB\backups\2013.10.02\uw.sql
> and got the following error:
> Invalid command \LongitudinalDB. Try \? For help.****
>
> **5) **OK, so maybe the backslashes are the problem. I then tried
> psql –f M:/LongitudinalDB/backups/2013.10.02/uw.sql
> and got no error.****
>
> **6) **However, none of the data or tables appeared in the db – it
> looks just as it did as a fresh db.****
>
> **7) **I tried a few other things in the psql window, deliberately
> typing nonsense. No error messages then, either, just a fresh prompt.****
>
> ** **
>
> Advice would be much appreciated.****
>
> ** **
>
> Thanks,
> Erin****
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message David Johnston 2013-10-18 14:18:50 Re: Restoring from SQL dump
Previous Message Erin Jonaitis 2013-10-18 13:57:29 Restoring from SQL dump