From: | John Koller <johnckoller(at)yahoo(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Schemas, databases, and backups |
Date: | 2005-11-25 16:38:37 |
Message-ID: | pan.2005.11.25.16.38.36.760253@yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Thu, 24 Nov 2005 07:51:03 -0500, Thomas Harold wrote:
> According to my reading of the pgsql documentation, the two basic backup
> scripts are pg_dump and pg_dumpall. pg_dump allows you to dump a single
> database to a file, while pg_dumpall dumps all of the databases to a
> single file.
>
> Currently, we use MSSQL's built-in backup facility. That allows us,
> with a single command, to dump every database to separate files on a
> daily basis (and we keep 14-days online). That makes recovering from a
> glitch in one of the databases very easy, and it's rather simple to go
> back to a particular day.
> So, now for the questions:
[SNIP]
>
> 1) Is there a tool (or is this easily scripted in bash?) that would
> iterate through the databases in pgsql and dump them to individual
> files? I'm guessing that we would query pg_databases and dump the
> database names to a file (how?) and then parse that to feed to pg_dump
> (I can figure this bit out myself).
{SNIP}
The FreeBSD port installs a script called 502.pgsql that dumps each
database to a separate file. It looks like it is close to what you
are looking for.
http://www.freebsd.org/cgi/cvsweb.cgi/ports/databases/postgresql81-server/
files/502.pgsql?rev=1.7&content-type=text/x-cvsweb-markup
From | Date | Subject | |
---|---|---|---|
Next Message | Vidar Steen | 2005-11-25 16:45:09 | pg_hba.conf reversed behaviour from 8.1.0beta3 -> 8.1.0 using JDBC |
Previous Message | T j i b b e | 2005-11-25 11:04:06 | PGXML support for postgreSQL on Windows |