Backing up multiple databases

From: Jacob Atzen <jaa(at)interflow(dot)dk>
To: pgsql-general(at)postgresql(dot)org
Subject: Backing up multiple databases
Date: 2005-06-17 11:52:08
Message-ID: 20050617115208.GA10732@interflow.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthew T. O'Connor 2005-06-17 11:58:53 Re: Autovacuum in the backend
Previous Message Gavin Sherry 2005-06-17 09:18:30 Re: Autovacuum in the backend