|
Home > Archive > PostgreSQL Discussion > May 2005 > using pg_dump to dump only a schema?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
using pg_dump to dump only a schema?
|
|
| thomas 2005-05-31, 8:24 pm |
| hi there,
i'm wondering, if i can use pg_dump to move only one schema of a db from
the one server, intoan other schema on the other server?
for example:
Server A:
Database: xyz_test
Schema: 123
Server B:
Database: xyz_prod
Schema: 999
The tablenames and so on are equal. and i wan't to transfer the data
with it. is it possible? and how? today i played a little bit with it,
but could not find a proper way with it. the description in the docu
didn't helped me either. any solution anyone?
thanx in advance!
bye,
thomas
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly
| |
| Scott Marlowe 2005-05-31, 8:24 pm |
| On Tue, 2005-05-31 at 15:03, thomas wrote:
> hi there,
>
> i'm wondering, if i can use pg_dump to move only one schema of a db from
> the one server, intoan other schema on the other server?
>
> for example:
>
> Server A:
> Database: xyz_test
> Schema: 123
>
> Server B:
> Database: xyz_prod
> Schema: 999
>
>
> The tablenames and so on are equal. and i wan't to transfer the data
> with it. is it possible? and how? today i played a little bit with it,
> but could not find a proper way with it. the description in the docu
> didn't helped me either. any solution anyone?
To dump a certain schema, use the -n switch, then edit / sed the output
to change the schemaname to something else and load it back into the
other database with psql.
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
|
|
|
|
|