Re: how do I do dump and restore without bugging with constraint?
"Net Tree Inc." wrote:
When I do restore it shown alot errors related with constraints.
How can I dump and to restore from old to new without dealing with
constraint and just forces data dump to where it suppose to belong?
What version are you dumping from and to? Exactly what errors are
you getting? (Copy and paste samples, please.)
You might want to review this page:
http://wiki.postgresql.org/wiki/Guide_to_reporting_problems
-Kevin
Ok, I am just trying to find the proper way to back and restore database
that contain restriction.
The other way to ask. If I have two 99% schema similar databases. The old
one might contain few columns that does not exist in the new one and contain
constrains that the new DB does not have. In that case, what's standard to
do this?
Since they are 99% similar in schema, can I do "data dump" only ? will that
work?
If owner for database between Old and new DB are different, do I must add
that owner in by create new role?
appreciated,
Steven
On Tue, Feb 23, 2010 at 1:02 PM, Kevin Grittner <Kevin.Grittner@wicourts.gov
wrote:
"Net Tree Inc." wrote:
When I do restore it shown alot errors related with constraints.
How can I dump and to restore from old to new without dealing with
constraint and just forces data dump to where it suppose to belong?What version are you dumping from and to? Exactly what errors are
you getting? (Copy and paste samples, please.)You might want to review this page:
http://wiki.postgresql.org/wiki/Guide_to_reporting_problems
-Kevin
--
---------------------------------------
Steven Huang
Why am I keep getting error with version issues.... I am trying to restore a
backup file from a 8.4 postgresql server to a 8.3 postgresql server.
[postgres@localhost ~]$ pg_restore -C -d postgres -i isamdb.backup
pg_restore.bin: [archiver] unsupported version (1.11) in file header
On Tue, Feb 23, 2010 at 1:02 PM, Kevin Grittner <Kevin.Grittner@wicourts.gov
wrote:
"Net Tree Inc." wrote:
When I do restore it shown alot errors related with constraints.
How can I dump and to restore from old to new without dealing with
constraint and just forces data dump to where it suppose to belong?What version are you dumping from and to? Exactly what errors are
you getting? (Copy and paste samples, please.)You might want to review this page:
http://wiki.postgresql.org/wiki/Guide_to_reporting_problems
-Kevin
--
---------------------------------------
Steven Huang
It is unreasonable to expect 8.3 programs to be able to understand
everything that 8.4 programs might write.
What format is your dump in? Plain text (--format=p) might work. Or
try dumping the 8.4 database with the 8.3 version of pg_dump, or maybe
use the 8.4 pg_restore against the 8.3 database.
--
Ian.
Show quoted text
On Tue, Feb 23, 2010 at 9:17 AM, Net Tree Inc. <nettreeinc@gmail.com> wrote:
Why am I keep getting error with version issues.... I am trying to restore a
backup file from a 8.4 postgresql server to a 8.3 postgresql server.
[postgres@localhost ~]$ pg_restore -C -d postgres -i isamdb.backup
pg_restore.bin: [archiver] unsupported version (1.11) in file headerOn Tue, Feb 23, 2010 at 1:02 PM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:"Net Tree Inc." wrote:
When I do restore it shown alot errors related with constraints.
How can I dump and to restore from old to new without dealing with
constraint and just forces data dump to where it suppose to belong?What version are you dumping from and to? Exactly what errors are
you getting? (Copy and paste samples, please.)You might want to review this page:
http://wiki.postgresql.org/wiki/Guide_to_reporting_problems
-Kevin
--
---------------------------------------
Steven Huang
On 23/02/10 09:17, Net Tree Inc. wrote:
Why am I keep getting error with version issues.... I am trying to restore a
backup file from a 8.4 postgresql server to a 8.3 postgresql server.
Well, an 8.4 dump isn't always going to be compatible with an 8.3
server, is it? If there weren't differences, the version number wouldn't
have changed.
[postgres@localhost ~]$ pg_restore -C -d postgres -i isamdb.backup
pg_restore.bin: [archiver] unsupported version (1.11) in file header
Try using the 8.4 pg_restore (but keep the "-i" to tell it to ignore the
version checks). You may still see errors, but there is a good chance it
will work.
You're also restoring into the "postgres" database here - is that what
you meant to do?
--
Richard Huxton
Archonet Ltd
yeah that's what I means to do.
How do I use 8.4 pg_restore? the DB server I am trying to restore is using
8.3. Do you mean do pg_restore on the same machine that I did pg_dump?? I am
thinking of doing that too, but I am not sure how to do the command.
Is this correct? pg_restore -h (my target machine IP) -U postgres -d (target
db) mydb.dump
Steven
On Tue, Feb 23, 2010 at 10:31 PM, Richard Huxton <dev@archonet.com> wrote:
On 23/02/10 09:17, Net Tree Inc. wrote:
Why am I keep getting error with version issues.... I am trying to restore
a
backup file from a 8.4 postgresql server to a 8.3 postgresql server.Well, an 8.4 dump isn't always going to be compatible with an 8.3 server,
is it? If there weren't differences, the version number wouldn't have
changed.[postgres@localhost ~]$ pg_restore -C -d postgres -i isamdb.backup
pg_restore.bin: [archiver] unsupported version (1.11) in file header
Try using the 8.4 pg_restore (but keep the "-i" to tell it to ignore the
version checks). You may still see errors, but there is a good chance it
will work.You're also restoring into the "postgres" database here - is that what you
meant to do?--
Richard Huxton
Archonet Ltd
--
---------------------------------------
Steven Huang