Discussion:
Backup / Restore
(too old to reply)
Eduardo S. Fontanetti
2004-06-23 11:40:34 UTC
Permalink
What is the most recommended way to backup a
PostgreSQL database?

And to restore it?

I would like to get ALL the data and properties
possible, because if I have a problem, and I lost my
current database, I can just restore it, and will be
all exactly like was before.

What is the best way? pg_dump? If yes, what options I
need to use?

Thanks a lot!!

Eduardo S. Fontanetti

______________________________________________________________________

Yahoo! Mail - agora com 100MB de espaço, anti-spam e antivírus grátis!
http://br.info.mail.yahoo.com/

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
V i s h a l Kashyap @ [Sai Hertz And Control Systems]
2004-06-23 13:27:57 UTC
Permalink
Dear Eduardo ,
Post by Eduardo S. Fontanetti
What is the most recommended way to backup a
PostgreSQL database?
pg_dump --disable-triggers -U <user_name> -a -d -b -D -Fc -Z 9 -f
<filername.tar.gz> <dbname>
+
A file system backup could be done but for this you will have to
shutdown PostgreSQL server
before filesystem backup is done
Post by Eduardo S. Fontanetti
And to restore it?
pg_restore --disable-triggers -U <user_name> -d <dbname>
<backupfilename.tar.gz>
IN case of Filesystem backup just stop PostgreSQL and replace the Dumped
or Tared file of the
filesystem

Links
http://www.commandprompt.com/ppbook/index.lxp?lxpwrap=x17860%2ehtm
And ofcource the PostgreSQL documentation itself
--
Best Regards,
Vishal Kashyap
Director / Lead Software Developer,
Sai Hertz And Control Systems Pvt Ltd,
http://saihertz.rediffblogs.com [Soon http://www.saihertz.com]
Yahoo IM: coeb_college[ a t ]yahoo.com


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html
Loading...