From: | "Charles Clavadetscher" <clavadetscher(at)swisspug(dot)org> |
---|---|
To: | "'Melvin Davidson'" <melvin6925(at)gmail(dot)com>, "'Adrian Klaver'" <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | "'Scott Marlowe'" <scott(dot)marlowe(at)gmail(dot)com>, <muralihw03(at)rediffmail(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Need Database Backup |
Date: | 2015-08-30 14:30:46 |
Message-ID: | 02b101d0e330$7fc97970$7f5c6c50$@swisspug.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Well the rest should be easy.
psql -U ... -h ... -p ... -d ... -f sql_file.sql
http://www.postgresql.org/docs/9.4/static/app-psql.html option "f"
From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Melvin Davidson
Sent: Sonntag, 30. August 2015 16:27
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>; muralihw03(at)rediffmail(dot)com; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Need Database Backup
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
On Sun, Aug 30, 2015 at 10:21 AM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)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(dot)klaver(at)aklaver(dot)com
--
Melvin Davidson
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2015-08-30 14:35:11 | Re: Need Database Backup |
Previous Message | Melvin Davidson | 2015-08-30 14:27:04 | Re: Need Database Backup |