Re: Need Database Backup - Mailing list pgsql-general

From Melvin Davidson
Subject Re: Need Database Backup
Date
Msg-id CANu8FiwqkXgiwd3Bqt6hLEK0PiuazV6o1+15+4VmbqQ-itOrtQ@mail.gmail.com
Whole thread Raw
In response to Re: Need Database Backup  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Good catch Adrian,

Murali,
Please change the restore command to

C:\PostgresDB\bin\psql.exe -U postgres -d <the database name> -f <your backup file name>


On Sun, Aug 30, 2015 at 10:40 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 08/30/2015 07:27 AM, Melvin Davidson wrote:
Adrian
 From Murali N Rao 5:43 AM (4 hours ago)

 >now i have installed new os and installed PGSQL again it working now
but no data

I plead lack of coffee, but where is that message and was there more in it?



On Sun, Aug 30, 2015 at 10:21 AM, Adrian Klaver
<adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote:

    On 08/30/2015 07:13 AM, Melvin Davidson wrote:

        You need to recreate the database to reload the data into so

             from the windows command line:
             C:\PostgresDB\bin\createdb.exe -U postgres <your db name>;


    That assumes Postgres is running, which at this point seems not to
    be the case or at least is unproven.


             Then to restore the data from the sql backup
             C:\PostgresDB\bin\pg_restore.exe -U postgres <the sql
        backup file>


    This will not work if the *.sql is a plain text file.






    --
    Adrian Klaver
    adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>




--
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


--
Adrian Klaver
adrian.klaver@aklaver.com



--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Need Database Backup
Next
From: kingl
Date:
Subject: Re: wal files stay in the pg_xlog dir