Backing up multiple databases - Mailing list pgsql-general

From Jacob Atzen
Subject Backing up multiple databases
Date
Msg-id 20050617115208.GA10732@interflow.dk
Whole thread Raw
Responses Re: Backing up multiple databases  ("Raymond O'Donnell" <rod@iol.ie>)
Re: Backing up multiple databases  (Richard Huxton <dev@archonet.com>)
List pgsql-general
Hello list,

I have a setup with multiple databases running on one Postgres. Say,
db1, db2 and db3.

I have two problems with this setup, the first is how to restore one of
the databases and leave the other two intact. If for example somebody
accidentally deletes data from db1 which needs to be restored I would
need to restore db1 but not db2 and db3. As far as I can tell there is
no easy way to do this with the current tools. I could make a script to
clean out the unneeded parts of the dump but before I do that I want to
make sure, there's no easier way to do this.

The second problem is a matter of database ownership. Apparently
pg_dumpall will dump the owners of the database along with the data.
This is causing trouble when I try to restore the dump on a server where
the owner doesn't exist. At the moment I have the server running on a
machine where the default owner is "pgsql" but on my local machine the
name is "postgres". How do I get around this? Should I just abandon
pg_dumpall and use pg_dump instead or is there some other way?

--
Thanks,
Jacob Atzen

pgsql-general by date:

Previous
From: Együd Csaba
Date:
Subject: Re: PG 8.0.1 is getting slow in 24 hours. Only daily VACUUM
Next
From: "Raymond O'Donnell"
Date:
Subject: Re: Backing up multiple databases