From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Alexander Staubo <alex(at)purefiction(dot)net> |
Cc: | fasupport(at)allcoast(dot)net, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Distributing PostGres database to various customers |
Date: | 2007-06-12 17:45:14 |
Message-ID: | 20070612174514.GC13344@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Jun 11, 2007 at 03:08:07PM +0200, Alexander Staubo wrote:
> On 6/11/07, Mike Gould <mgould(at)allcoast(dot)net> wrote:
> >How can we do this with PostGres? Other than backup and restore or
> >creating
> >SQL scripts I haven't been able to find another method. Some of these
> >tables may have over a million rows in them initially if we convert old
> >data.
>
> The most portable way is probably pg_dump as plaintext:
>
> pg_dump -Fp mydatabase >mydatabase.dump
>
> Then restore with:
>
> cat mydatabase.dump | psql mydatabase
This is better phrased:
psql -f mydadatabase.dump
If anything goes wrong, the error will contain the line number where
it went wrong.
Cheers,
D
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter
Remember to vote!
Consider donating to PostgreSQL: http://www.postgresql.org/about/donate
From | Date | Subject | |
---|---|---|---|
Next Message | Kenneth Downs | 2007-06-12 17:48:52 | Re: PGSQL development tools. Any advice? |
Previous Message | Jiri Jakes | 2007-06-12 17:44:32 | Re: PGSQL development tools. Any advice? |