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

Re: Help to dump tables in a database and restore in another database

From: Intengu Technologies <sindile(dot)bidla(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Help to dump tables in a database and restore in another database
Date: 2010-01-05 10:42:34
Message-ID: a1afa64b1001050242n25e0025hb7b60c5e2b74caa8@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
Running Windows7 with Postgresql 8.4

I am trying to dump about 132 tables, this is my command:

pg_dump --host localhost --port 5432 --username postgres -o -v -t
'myschema.*' dbname > mydump.sql

This generates an error no matching tables were found, is the asterisk
not a wild card meaning all tables found in the schema named myschema

When restoring the tables from the dump will i still have the 132
tables or 1 table

Your valued advise is appreciated.


2009/10/18 Andreas Kretschmer <akretschmer(at)spamfence(dot)net>:
> Joshua Tolley <eggyknap(at)gmail(dot)com> wrote:
>
>> On Fri, Oct 16, 2009 at 09:38:44AM +0200, Intengu Technologies wrote:
>> > I would like to dump a number of tables from a database and load them
>> > on another database. How do I accomplish this.
>>
>> pg_dump makes this easy. Documentation is here:
>> http://www.postgresql.org/docs/8.4/static/app-pgdump.html
>
> Right, additionally, pg_dump has options to specify only destined
> tables, views, sequence, schemas etc. to dump.
>
>
> Andreas
> --
> Really, I'm not out to destroy Microsoft. That will just be a completely
> unintentional side effect.                              (Linus Torvalds)
> "If I was god, I would recompile penguin with --enable-fly."   (unknown)
> Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>



-- 
Sindile Bidla

In response to

Responses

pgsql-novice by date

Next:From: Thomas KellererDate: 2010-01-05 10:50:15
Subject: Re: Help to dump tables in a database and restore in another database
Previous:From: Shabala DeshpandeDate: 2010-01-05 09:37:18
Subject: Re: to find table stats for last update time.

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