Skip site navigation (1) Skip section navigation (2)

Re: Schemas, databases, and backups

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: (view raw, whole thread or download thread mbox)
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:
> 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).

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.

In response to

pgsql-novice by date

Next:From: Vidar SteenDate: 2005-11-25 16:45:09
Subject: pg_hba.conf reversed behaviour from 8.1.0beta3 -> 8.1.0 using JDBC
Previous:From: T j i b b eDate: 2005-11-25 11:04:06
Subject: PGXML support for postgreSQL on Windows

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group