470,614 Members | 1,458 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,614 developers. It's quick & easy.

How to import data from ver 7.3.2 to 7.0.2 installation

I'm not going to bore you with the what's, why's and where for's and I'm not
looking for the suggestion of upgrade the other server.

I have a server running Postgres 7.3.2 and need to transfer the whole
database (structure, data, etc but not permissions) to another server
running Postgres 7.0.2.

I have tried this command with pg_dump on the 7.3.2 install to make a backup
of the data an a plain text file:

pg_dump -f /home/postgres/grd01.sql -O -x grd01

Switches I have used should do:

-O Causes ownership to not be taken into account in the dump. A restore
with suppressed ownership will cause all re-created objects to belong to the
user performing the restore.

-x Supresses and GRANT or REVOKE statements, which are usually used to
preserve the rights set at the time of the dump. Use this flag if you do
not wish to enforce any existing rights or restrictions when re-creating a
database from this dump.

On the 7.0.2 server I have then created a user grd01 and used this user to
create database grd01. I then run this command using the file I have FTP'd
across:

psql -U grd01 -f /home/postgres/grd01.sql grd01

I get lot's of this sort of thing:

psql:/home/postgres/grd01.sql:68: invalid command \N
psql:/home/postgres/grd01.sql:68: invalid command \N
psql:/home/postgres/grd01.sql:68: invalid command \N
psql:/home/postgres/grd01.sql:68: invalid command \N
psql:/home/postgres/grd01.sql:68: invalid command \N
psql:/home/postgres/grd01.sql:69: invalid command \N
psql:/home/postgres/grd01.sql:69: invalid command \N
psql:/home/postgres/grd01.sql:69: invalid command \N
psql:/home/postgres/grd01.sql:69: invalid command \N
psql:/home/postgres/grd01.sql:69: invalid command \N
psql:/home/postgres/grd01.sql:69: invalid command \N

and that's it! Can I regress a database like this or are the commands
created on the newer version not compatable with the older server. Are
there any work arounds to this?

As further analysis if I try and import this database to another server
running 7.3.2 it works fine.

Thanks very much in advance, any assistance greatly appreciated.

--
Simon Ashford MCP
IT Consultant, Netlink Data Solutions Limited.

Nov 11 '05 #1
0 1817

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Manlio Perillo | last post: by
1 post views Thread by ekyungchung | last post: by
reply views Thread by benjamin.scott | last post: by
4 posts views Thread by TonyMontana | last post: by
7 posts views Thread by phillip.s.powell | last post: by
1 post views Thread by Dave | last post: by
5 posts views Thread by luca72 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.