| From: | "Zlatko Matic" <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr> | 
|---|---|
| To: | "ketan shah" <ketan_dba(at)yahoo(dot)com>, <pgsql-general(at)postgresql(dot)org> | 
| Subject: | Re: how to use pg_dump and then restored onto development server | 
| Date: | 2005-06-29 15:07:55 | 
| Message-ID: | 001201c57cbc$55d27940$c5861dc3@zlatko58zaczpv | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
Concerning this question about pg_dump, I'm also confused and don't understand when to use pg_restore and when to use psql ?
For example, how to restore in these two cases: 
A) pg_dump -f D:\MYDB_BCP -c -x -h localhost -U postgres MYDB
B) pg_dump -f D:\MYDB_BCP -Fc -c -x -h localhost -U postgres MYDB 
Thanks.
  ----- Original Message ----- 
  From: ketan shah 
  To: pgsql-general(at)postgresql(dot)org 
  Sent: Wednesday, June 29, 2005 4:48 PM
  Subject: [GENERAL] how to use pg_dump and then restored onto development server
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
  __________________________________________________
  Do You Yahoo!?
  Tired of spam? Yahoo! Mail has the best spam protection around 
  http://mail.yahoo.com 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2005-06-29 15:16:50 | Re: CVS Build - No Doc | 
| Previous Message | Douglas McNaught | 2005-06-29 15:07:08 | Re: how to use pg_dump and then restored onto development server |