pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRestoring single database from an export dump of a cluster
2+ messages / 2 participants
[nested] [flat]
* Restoring single database from an export dump of a cluster
@ 2007-04-05 21:13 Bhella, Paramjeet <PBhella@Motorola.com>
0 siblings, 1 reply; 2+ messages in thread
From: Bhella, Paramjeet @ 2007-04-05 21:13 UTC (permalink / raw)
To: pgsql-admin
Hi
In our production environment we use pg_dumpall to backup all the
databases of a cluster as there are 200+ databases in a cluster. Some
times there is a situation where we have to restore a single database
from a cluster. According to the postgres docs there is a pg_restore
utiltity which can be used to restore individual tables, schemas,
databases etc. But pg_restore requires the pg_dump to be in archive
format. With pg_dump we can use option -Fc to make the dump in non-plain
text format but I cannot use -Fc option with pg_dumpall. Is there a way
to import a single database from an export dump of a cluster? Your help
or guidance will be highly appreciated.
Thanks
Paramjeet Kaur
Professional Services and Motorola Broadband Solutions Group
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Restoring single database from an export dump of a cluster
@ 2007-04-12 01:12 Robert Treat <xzilla@users.sourceforge.net>
parent: Bhella, Paramjeet <PBhella@Motorola.com>
0 siblings, 0 replies; 2+ messages in thread
From: Robert Treat @ 2007-04-12 01:12 UTC (permalink / raw)
To: pgsql-admin; +Cc: Bhella, Paramjeet <PBhella@motorola.com>
On Thursday 05 April 2007 17:13, Bhella, Paramjeet wrote:
> Hi
>
> In our production environment we use pg_dumpall to backup all the
> databases of a cluster as there are 200+ databases in a cluster. Some
> times there is a situation where we have to restore a single database
> from a cluster. According to the postgres docs there is a pg_restore
> utiltity which can be used to restore individual tables, schemas,
> databases etc. But pg_restore requires the pg_dump to be in archive
> format. With pg_dump we can use option -Fc to make the dump in non-plain
> text format but I cannot use -Fc option with pg_dumpall. Is there a way
> to import a single database from an export dump of a cluster? Your help
> or guidance will be highly appreciated.
>
Currently there is no way to restore a single database from a pg_dumpall short
of heavy parsing of the dumpall script. What I usually recommend to folks
(and do with our servers @ omniti) is to have a script that does a
pg_dumpall -g for the global objects and then individual pg_dump -Fc's for
each database in the cluster.
--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-04-12 01:12 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-04-05 21:13 Restoring single database from an export dump of a cluster Bhella, Paramjeet <PBhella@Motorola.com>
2007-04-12 01:12 ` Robert Treat <xzilla@users.sourceforge.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox