Re: Dumping/Restoring with constraints?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Phoenix Kiula" <phoenix(dot)kiula(at)gmail(dot)com>
Cc: "PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Dumping/Restoring with constraints?
Date: 2008-08-27 14:42:56
Message-ID: 23571.1219848176@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

"Phoenix Kiula" <phoenix(dot)kiula(at)gmail(dot)com> writes:
> This is the dump command being used on a 8.2.3 database on Linux:

> $ pg_dumpall > mydb.sql
> $ umask 077
> $ gzip mydb.sql

> Then I download the mydb.sql.gz file into my local computer (Mac OSX
> with 8.3.3) and unzip it to mydb.sql.

That's all fine ...

> The local database is already created, with all tables and constraints and all.

... but this isn't. A pg_dump script expects to restore into an empty
database. For pg_dumpall, you shouldn't even have created the
databases, just start from a virgin installation.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Phoenix Kiula 2008-08-27 14:51:42 Re: Dumping/Restoring with constraints?
Previous Message Phoenix Kiula 2008-08-27 14:40:41 Re: Dumping/Restoring with constraints?

Browse pgsql-general by date

  From Date Subject
Next Message Phoenix Kiula 2008-08-27 14:51:42 Re: Dumping/Restoring with constraints?
Previous Message Phoenix Kiula 2008-08-27 14:40:41 Re: Dumping/Restoring with constraints?