X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 11158D1B45C for ; Sat, 20 Dec 2003 05:52:20 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 46753-03 for ; Sat, 20 Dec 2003 01:51:30 -0400 (AST) Received: from fusion.bennyvision.com (fusion.bennyvision.com [216.161.119.28]) by svr1.postgresql.org (Postfix) with SMTP id DF65AD1B467 for ; Sat, 20 Dec 2003 01:51:28 -0400 (AST) Received: (qmail 7188 invoked from network); 20 Dec 2003 05:51:28 -0000 Received: from localhost (HELO webmail.stinkweasel.net) (127.0.0.1) by fusion.bennyvision.com with SMTP; 20 Dec 2003 05:51:28 -0000 Received: from 63.227.74.41 (SquirrelMail authenticated user benny) by webmail.stinkweasel.net with HTTP; Fri, 19 Dec 2003 23:51:06 -0600 (CST) Message-ID: <59830.63.227.74.41.1071899488.squirrel@webmail.stinkweasel.net> Date: Fri, 19 Dec 2003 23:51:06 -0600 (CST) Subject: pg_dump vs pg_dumpall - small database cluster, complete recovery method needed From: "C. Bensend" To: pgsql-admin@postgresql.org User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/284 X-Sequence-Number: 11790 Hey folks, I'm a systems/network guy and not a developer/DBA, FYI. I'm in the process of redoing a personal, low-traffic website to use PHP and PostgreSQL as a learning exercise. I've got all the code done and the database is populated, so now I'm tying up the loose ends, namely backups. I am using PostgreSQL 7.3 on OpenBSD 3.4-STABLE. I've been going over the docs for pg_dump and pg_dumpall, and I just want to make sure I'm understanding things correctly. If I'm reading things right, pg_dump is probably better suited to dumping individual databases, and pg_dumpall is suited to dumping a database _system_ (ie, multiple databases on one host). What I need: In case of complete system failure, I need to be able to recreate a database cluster from step 0 through accepting connections. I can easily reproduce the database machine with PostgreSQL in a matter of an hour. From that specific point, having a completely clean DB, I need to restore all users, passwords, databases, sequences, etc. pg_dumpall seems to do this for me, without any command-line args needed. Am I correct in saying that 'pg_dumpall > filename' will produce a PostgreSQL dump that includes _everything_ I need to go from a clean PG install to accepting connections again with data intact? Users, passwords, etc? I just want to be _very_ sure of this, before I automate the entire process. :) I did attempt to search the archives for pgsql-admin, but the archives seem to not be happy at the moment. Hopefully, this isn't a FAQ, I did read through the FAQs on postgresql.org (it's always possible I missed something). Thanks folks! PostgreSQL is a very impressive project. Benny -- "Hey, get in here, Boozy! You're late for your drunkening!" -- Moe, "The Simpsons"