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"