From: | "Phoenix Kiula" <phoenix(dot)kiula(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "PG-General Mailing List" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Dumping/Restoring with constraints? |
Date: | 2008-08-27 14:12:57 |
Message-ID: | e373d31e0808270712n7c599a82sca5a6bbf6cc5c20a@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-general |
> The recommended solution is to use a regular schema-and-data dump.
> If you really have to separate schema and data, the --disable-triggers
> switch might help, though you open yourself to the possibility of
> loading inconsistent data that way.
Thanks Tom.
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.
The local database is already created, with all tables and constraints and all.
Here is the command I use to restore:
$ psql -d mydb -U myuser -h localhost --file=mydb.sql
Is this not the recommended method?
From | Date | Subject | |
---|---|---|---|
Next Message | Terry Lee Tucker | 2008-08-27 14:15:00 | Re: Dumping/Restoring with constraints? |
Previous Message | windsurferdrew-pg | 2008-08-27 14:07:17 | WAL files during a backup |
From | Date | Subject | |
---|---|---|---|
Next Message | Terry Lee Tucker | 2008-08-27 14:15:00 | Re: Dumping/Restoring with constraints? |
Previous Message | Lennin Caro | 2008-08-27 13:58:33 | Re: [GENERAL] PITR - base backup question |