how use pg_dump/pg_restore

From: "Ketan S Shah" <kshah2(at)omalas(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: how use pg_dump/pg_restore
Date: 2005-06-29 14:24:47
Message-ID: 000001c57cb6$4de03ac0$f701a8c0@ketema
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
All ,

I am newbie to postgres database. How to take pg_dump from production
database and restore into development server using pg_restore..

>From documentation, I find that I have to use pg_dump for backup and
pg_restore for restoration.

My database name is otsdb..

For backup.I use command

Pg_dump otsdb > /home/Ketan/otsdbbkp.out

But after successfully dump.I can't see the otsdbbkp.out file in
/home/Ketan/

If I get otsdbbkp.out file then I copy this file on my development
server and then I issue the following command .

Psql -d otsdb -f otsdbbkp.out


(my development server database name is otsdb)

pl. help me..

If any thing wrong pl. guide me..

Ketan shah

Browse pgsql-general by date

  From Date Subject
Next Message Sven Willenberger 2005-06-29 14:28:24 Re: PostgreSQL's vacuumdb fails to allocate memory for
Previous Message Doug Bloebaum 2005-06-29 14:20:32 Re: truncate all tables?