dbTalk Databases Forums  

restore databas backup postgres 7.4 to 8

comp.databases.postgresql comp.databases.postgresql


Discuss restore databas backup postgres 7.4 to 8 in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ismael
 
Posts: n/a

Default restore databas backup postgres 7.4 to 8 - 01-26-2007 , 03:33 AM






Hi all

I have a problem trying to restore a backup of a database from postgres 7.4
to 8. When I execute the backup file with "\i FILE" i get a lot of messages
of "invalid command \N" when try to restore the data of tables.

The tables are restored ok but the primary and foreign keys, and data table
aren't restored.

I use pg_dump for backup and \i FILE for restore.

which way are better for make backup and restore?

Best regards.

Reply With Quote
  #2  
Old   
EMartinez
 
Posts: n/a

Default Re: restore databas backup postgres 7.4 to 8 - 02-14-2007 , 10:57 PM






On Jan 26, 3:33 am, ismael <ismael.perna... (AT) gmail (DOT) es> wrote:
Quote:
Hi all

I have a problem trying to restore a backup of a database from postgres 7.4
to 8. When I execute the backup file with "\i FILE" i get a lot of messages
of "invalid command \N" when try to restore the data of tables.

The tables are restored ok but the primary and foreign keys, and data table
aren't restored.

I use pg_dump for backup and \i FILE for restore.

which way are better for make backup and restore?

Best regards.
One way I have resolved this same issue in the past was to restore
'Database Schema only' first then restore 'Data only' afterwards. Hope
this helps.

Regards,

Enrique Martinez
Sr. Web/Database Developer



Reply With Quote
  #3  
Old   
HansH
 
Posts: n/a

Default Re: restore databas backup postgres 7.4 to 8 - 02-15-2007 , 02:10 AM



"EMartinez" <emartinez.pr1 (AT) gmail (DOT) com> schreef in bericht
news:1171515456.174520.300770 (AT) l53g2000cwa (DOT) googlegroups.com...
Quote:
I have a problem trying to restore a backup of a database from postgres
7.4
to 8. When I execute the backup file with "\i FILE" i get a lot of
messages
of "invalid command \N" when try to restore the data of tables.
I use pg_dump for backup and \i FILE for restore.

One way I have resolved this same issue in the past was to restore
'Database Schema only' first then restore 'Data only' afterwards. Hope
this helps.

Have solved about the same thing restoring to 8.1.5 from 8.1.2 and even
8.1.5 to 8.1.5 by using 'psql ... -f FILE' to restore.
Apperently \i cannot handle dumps with 'COPY table ( field ..., fieldn) FROM
stdin;'.
Dumps created with -d of -D option can be restored interactively.

HansH




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.