473,386 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 1900

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Manlio Perillo | last post by:
Hi. I'm a new user of Python but I have noted a little problem. Python is a very good language but it is evolving, in particular its library is evolving. This can be a problem when, ad example,...
1
by: ekyungchung | last post by:
I did install the python 2.4 and nltk. I am trying to follow the tutorial, but I kept getting error messages about importing corpus as follows ===================================================...
0
by: benjamin.scott | last post by:
Hello, I am using an XP box and Python 2.3 (Enthought Edition). I am getting the same error with both of the .exe's listed on sourceforge: tables-1.0.win32-py2.3.exe...
4
by: TonyMontana | last post by:
Hello, I've the following problem. I've to read out the data of a custom application. I think (I'm not sure) this application is using a Paradox DB to store it's information. I don't know it...
4
by: MIG | last post by:
We have new PCs with XP, but have installed Access 97 for reasons of backwards compatibility. When Access 97 was installed on NT, the Import Text Wizard used to allow the user to highlight each...
7
by: phillip.s.powell | last post by:
We're looking at a GUI interface for our MySQL DB and I am interested in MySQL Administrator, however, one of our requirements is to be able to import/export databases. Is this possible or do I...
2
by: Jon | last post by:
It appears that (windows) python searches in the current working directory before looking in the local site-packages directory, or that '.' comes first in sys.path? The problem arises when I made...
1
by: Dave | last post by:
Hello, I've been given the job of recovering a database. It's mysql, version unknown but i'd suspect probably 3 maybe 4 certainly not 5. Apparently the host provider where this was didn't set up...
5
by: luca72 | last post by:
Hello i can't import cherrypy2 but i don't know why this is the sys path: '', '/home/pirataja/opo.net/python/lib/python2.5/site-packages/ setuptools-0.6c7-py2.5.egg',...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.