Thread: Retore database on win xp from back up created with win 7 64 bit gets unsupported version

<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">I have pgadmin 1.10.0 installed on  2
machines.One is win xp and one is win 7 64 bit. I even checked that the rev numbers are the same. The back up was
createdusing the win 7 64 machine (both using gui and batch file). When I try to use the win xp machine to restore the
databaseI get the "unsupported version (1.11) in file header" error. Restoring using the win 7 64 machine works
regardlessof which machine creates the back up.<br /><br /> pg_dump.exe and pg_restore.exe are the same versions on
bothmachines (8.4.0.9177).<br /><br /> Is there a difference in the back up file if win 7 64 creates it versus win xp
creatingit?<br /><br /> Thanks for any help in getting this resolved.<br /> Ron Gregor </div> 
On 29/06/2015 16:51, Ron Gregor wrote:
> I have pgadmin 1.10.0 installed on  2 machines. One is win xp and one is
> win 7 64 bit. I even checked that the rev numbers are the same. The back
> up was created using the win 7 64 machine (both using gui and batch
> file). When I try to use the win xp machine to restore the database I
> get the "unsupported version (1.11) in file header" error. Restoring
> using the win 7 64 machine works regardless of which machine creates the
> back up.
> 
> pg_dump.exe and pg_restore.exe are the same versions on both machines
> (8.4.0.9177).
> 
> Is there a difference in the back up file if win 7 64 creates it versus
> win xp creating it?

Only guessing here, but could it be a 32/64-bit problem?

You could also try using the text format for the backup, if your
database isn't too big - that's bound to work.

HTH,

Ray.

-- 
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie



On 29/06/2015 18:11, Ron Gregor wrote:
> 32/64 bit problem - That is what I am trying to find out if there is
> a problem with running the on 32 bit versus 64 bit machines. I did
> not find any place to download a windows 64 bit version.
> 
> I created a backup using the PLAIN option (closes to text option
> available) which created a sql file. When I tried to restore this
> file pgadmin gave me an error "input file does not appear to be a
> valid archive".

Yes, sorry - PLAIN is indeed the text option. You can't use it with
pg_restore, though; it needs to be run through psql.

Ray.


-- 
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie



32/64 bit problem - That is what I am trying to find out if there is a problem with running the on 32 bit versus 64 bit
machines.I did not find any place to download a windows 64 bit version. 

I created a backup using the PLAIN option (closes to text option available) which created a sql file. When I tried to
restorethis file pgadmin gave me an error "input file does not appear to be a valid archive". 

Thanks, Ron

________________________________________
From: Raymond O'Donnell [rod@iol.ie]
Sent: Monday, June 29, 2015 12:22 PM
To: Ron Gregor; pgadmin-support@postgresql.org
Subject: Re: [pgadmin-support] Retore database on win xp from back up created with win 7 64 bit gets unsupported
version

On 29/06/2015 16:51, Ron Gregor wrote:
> I have pgadmin 1.10.0 installed on  2 machines. One is win xp and one is
> win 7 64 bit. I even checked that the rev numbers are the same. The back
> up was created using the win 7 64 machine (both using gui and batch
> file). When I try to use the win xp machine to restore the database I
> get the "unsupported version (1.11) in file header" error. Restoring
> using the win 7 64 machine works regardless of which machine creates the
> back up.
>
> pg_dump.exe and pg_restore.exe are the same versions on both machines
> (8.4.0.9177).
>
> Is there a difference in the back up file if win 7 64 creates it versus
> win xp creating it?

Only guessing here, but could it be a 32/64-bit problem?

You could also try using the text format for the backup, if your
database isn't too big - that's bound to work.

HTH,

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie



<p dir="ltr">Le 29 juin 2015 11:25 PM, "Ron Gregor" <<a href="mailto:RGregor@wcnjcd.com">RGregor@wcnjcd.com</a>>
aécrit :<br /> ><br /> > 32/64 bit problem - That is what I am trying to find out if there is a problem with
runningthe on 32 bit versus 64 bit machines. I did not find any place to download a windows 64 bit version.<br />
><br/> > I created a backup using the PLAIN option (closes to text option available) which created a sql file.
WhenI tried to restore this file pgadmin gave me an error "input file does not appear to be a valid archive".<br />
><pdir="ltr">That has nothing to do with 32 vs 64 bits. PgAdmin uses pg_restore to restore a backup, and pg_restore
knowsnothing about plain backup. It can only work with binary backup (ie tar, custom, or directory).<p dir="ltr">You'll
haveto do a backup again, this time in one of the binary formats. Or use psql to restore your backup. 
I only did the plain text as it was a suggested test. I still have the situation that the same version of pgadmin makes a back up on a win 7 64 bit machine can not be restored using a win xp system. It gets the unsupported version error for some unknown reason. Both systems used the same msi file to install pgadmin and I double checked that pg_dump.exe and pg_restore.exe are the same versions on both machines.

From: Guillaume Lelarge [guillaume@lelarge.info]
Sent: Tuesday, June 30, 2015 1:22 AM
To: Ron Gregor
Cc: pgadmin-support@postgresql.org; rod@iol.ie
Subject: Re: [pgadmin-support] Retore database on win xp from back up created with win 7 64 bit gets unsupported version

Le 29 juin 2015 11:25 PM, "Ron Gregor" <RGregor@wcnjcd.com> a écrit :
>
> 32/64 bit problem - That is what I am trying to find out if there is a problem with running the on 32 bit versus 64 bit machines. I did not find any place to download a windows 64 bit version.
>
> I created a backup using the PLAIN option (closes to text option available) which created a sql file. When I tried to restore this file pgadmin gave me an error "input file does not appear to be a valid archive".
>

That has nothing to do with 32 vs 64 bits. PgAdmin uses pg_restore to restore a backup, and pg_restore knows nothing about plain backup. It can only work with binary backup (ie tar, custom, or directory).

You'll have to do a backup again, this time in one of the binary formats. Or use psql to restore your backup.

2015-06-30 13:44 GMT+02:00 Ron Gregor <RGregor@wcnjcd.com>:
I only did the plain text as it was a suggested test.

That's a good test as long as you don't use pgAdmin to restore it :)
 
I still have the situation that the same version of pgadmin makes a back up on a win 7 64 bit machine can not be restored using a win xp system. It gets the unsupported version error for some unknown reason. Both systems used the same msi file to install pgadmin and I double checked that pg_dump.exe and pg_restore.exe are the same versions on both machines.

I've read the whole thread. It seems you have the "unsupported version (1.11) in file header". It still has nothing to do with your OS version or 32bits/64 bits OS. 1.11 dumps are created with a 8.4 pg_dump. So, the pg_restore you're using isn't 8.4. It might be 8.3 (version 1.10 dumps required) or 9.0+ (version 1.12 dumps required).

Be careful that you might have more than one version of pg_restore installed on your computer. Actually, pgadmin installs its own pg_restore tool. Which release of pgAdmin are you using?


--
I am running 1.10.0 on both systems. Both were installed using the same MSI. The pgdump and pg restore in both 1.10 folders are the same version.

** I finally figured out what the problem was. After going through all the menus I found that the options at some point on my win XP system had the PG bin path set to the 1.8 pgadmin folder. Once I set this to the proper (1.10) folder it worked. This was most likely set when I first took over IT management to be compatible with the batch program that creates back ups every night but I updated the batch version when I move the back up system to a new computer.

Thanks to all that helped on this matter.



From: Guillaume Lelarge [guillaume@lelarge.info]
Sent: Tuesday, June 30, 2015 4:37 PM
To: Ron Gregor
Cc: pgadmin-support@postgresql.org; rod@iol.ie
Subject: Re: [pgadmin-support] Retore database on win xp from back up created with win 7 64 bit gets unsupported version

2015-06-30 13:44 GMT+02:00 Ron Gregor <RGregor@wcnjcd.com>:
I only did the plain text as it was a suggested test.

That's a good test as long as you don't use pgAdmin to restore it :)
 
I still have the situation that the same version of pgadmin makes a back up on a win 7 64 bit machine can not be restored using a win xp system. It gets the unsupported version error for some unknown reason. Both systems used the same msi file to install pgadmin and I double checked that pg_dump.exe and pg_restore.exe are the same versions on both machines.

I've read the whole thread. It seems you have the "unsupported version (1.11) in file header". It still has nothing to do with your OS version or 32bits/64 bits OS. 1.11 dumps are created with a 8.4 pg_dump. So, the pg_restore you're using isn't 8.4. It might be 8.3 (version 1.10 dumps required) or 9.0+ (version 1.12 dumps required).

Be careful that you might have more than one version of pg_restore installed on your computer. Actually, pgadmin installs its own pg_restore tool. Which release of pgAdmin are you using?


--