pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to recover data from 9.3 data directory
11+ messages / 4 participants
[nested] [flat]

* How to recover data from 9.3 data directory
@ 2021-03-13 13:28 Andrus <kobruleht2@hot.ee>
  2021-03-13 13:45 ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  0 siblings, 1 reply; 11+ messages in thread

From: Andrus @ 2021-03-13 13:28 UTC (permalink / raw)
  To: pgsql-general

Hi!

There is data directory from Postgres 9.3 server from old Centos.

Centos server is not running anymore and there is window 10 workstation 
to recover.

1. Tried to recover data from it installing 9.3 and 13 servers in 
windows 10 and using

"C:\Program Files\PostgreSQL\13\bin\pg_upgrade.exe" ^
--old-datadir "D:/Centos93Data/data" ^
--new-datadir "C:/Program Files/PostgreSQL/13/data" ^
--old-bindir "C:/Program Files/PostgreSQL/9.3/bin" ^
--new-bindir "C:/Program Files/PostgreSQL/13/bin"

It complained that postmaster seems working. I deleted postmaster.pid 
file. Now it throws  error

Performing Consistency Checks
Checking cluster versions ok
The source cluster was not shut down cleanly.
Failure, exiting

2. Tried to run old server using

C:\Program Files\PostgreSQL\9.3\bin\pg_ctl.exe" start -D 
"D:/Centos93Data/data"

got error

FATAL:  database files are incompatible with server

DETAIL:  The database cluster was initialized with USE_FLOAT8_BYVAL but 
the server was compiled without USE_FLOAT8_BYVAL.
HINT:  It looks like you need to recompile or initdb.

I tried both 32 and 64 bit 9.3 servers in windows but error is the same.

How to recover data from 9.3 linux directory ?

Andrus.

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: How to recover data from 9.3 data directory
  2021-03-13 13:28 How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
@ 2021-03-13 13:45 ` Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 14:02   ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  0 siblings, 1 reply; 11+ messages in thread

From: Julien Rouhaud @ 2021-03-13 13:45 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; +Cc: pgsql-general

Le sam. 13 mars 2021 à 21:29, Andrus <kobruleht2@hot.ee> a écrit :

> 2. Tried to run old server using
>
C:\Program Files\PostgreSQL\9.3\bin\pg_ctl.exe" start -D
> "D:/Centos93Data/data"
> got error
>
> FATAL:  database files are incompatible with server
> DETAIL:  The database cluster was initialized with USE_FLOAT8_BYVAL but
> the server was compiled without USE_FLOAT8_BYVAL.
> HINT:  It looks like you need to recompile or initdb.
>
> I tried both 32 and 64 bit 9.3 servers in windows but error is the same.
>
> How to recover data from 9.3 linux directory ?
>
that won't work on windows. pg_upgrade only works if source and target
environment are binary compatible, which isn't the case for windows / GNU
Linux.

>

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: How to recover data from 9.3 data directory
  2021-03-13 13:28 How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 13:45 ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
@ 2021-03-13 14:02   ` Andrus <kobruleht2@hot.ee>
  2021-03-13 14:11     ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  0 siblings, 1 reply; 11+ messages in thread

From: Andrus @ 2021-03-13 14:02 UTC (permalink / raw)
  To: Julien Rouhaud <rjuju123@gmail.com>; +Cc: pgsql-general

Hi!

 > that won't work on windows. pg_upgrade only works if source and 
target environment are binary compatible, which isn't the case for 
windows / GNU Linux.

wal archiving works between Linux and Windows. So I expected those 
commands to work also.

How to determine is this data from 32 or 64 bit server ?

Should I create virtual machine and install Linux with 9.3 into it or is 
there simpler solution?

Will data from 32 bit server require 32 bit Linux with 32 bit postgres 
or will it work with 64 bit Linux also ?

Andrus.

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: How to recover data from 9.3 data directory
  2021-03-13 13:28 How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 13:45 ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 14:02   ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
@ 2021-03-13 14:11     ` Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 14:18       ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  0 siblings, 1 reply; 11+ messages in thread

From: Julien Rouhaud @ 2021-03-13 14:11 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; +Cc: pgsql-general

Le sam. 13 mars 2021 à 22:02, Andrus <kobruleht2@hot.ee> a écrit :

> Hi!
>
> > that won't work on windows. pg_upgrade only works if source and target
> environment are binary compatible, which isn't the case for windows / GNU
> Linux.
>
> wal archiving works between Linux and Windows. So I expected those
> commands to work also.
>

WAL archiving is only a file copy, you can copy them anywhere without
restrictions on the architecture.

> How to determine is this data from 32 or 64 bit server ?
>
it's not really a question of the binary pointer size but the target
hardware specificity.

> Should I create virtual machine and install Linux with 9.3 into it or is
> there simpler solution?
>
that's the only option, unless you already have some compatible server
around.

> Will data from 32 bit server require 32 bit Linux with 32 bit postgres or
> will it work with 64 bit Linux also ?
>
I think that it won't matter and a 64 bits server will work just fine, but
only testing will give a definite answer.

>

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: How to recover data from 9.3 data directory
  2021-03-13 13:28 How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 13:45 ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 14:02   ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 14:11     ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
@ 2021-03-13 14:18       ` Andrus <kobruleht2@hot.ee>
  2021-03-13 14:42         ` Re: How to recover data from 9.3 data directory Guillaume Lelarge <guillaume@lelarge.info>
  0 siblings, 1 reply; 11+ messages in thread

From: Andrus @ 2021-03-13 14:18 UTC (permalink / raw)
  To: Julien Rouhaud <rjuju123@gmail.com>; +Cc: pgsql-general

    Should I create virtual machine and install Linux with 9.3 into it
    or is there simpler solution?

> that's the only option, unless you already have some compatible server 
> around.

I have new Debian virtual machine with Postgres 12  .

Debian does not offer to install Postgres 9.3 into it. How to install 
postgres 9.3 in new Debian ?

Andrus.

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: How to recover data from 9.3 data directory
  2021-03-13 13:28 How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 13:45 ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 14:02   ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 14:11     ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 14:18       ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
@ 2021-03-13 14:42         ` Guillaume Lelarge <guillaume@lelarge.info>
  2021-03-13 15:25           ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  0 siblings, 1 reply; 11+ messages in thread

From: Guillaume Lelarge @ 2021-03-13 14:42 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; +Cc: Julien Rouhaud <rjuju123@gmail.com>; pgsql-general

Le sam. 13 mars 2021 à 15:18, Andrus <kobruleht2@hot.ee> a écrit :

> Should I create virtual machine and install Linux with 9.3 into it or is
>> there simpler solution?
>>
> that's the only option, unless you already have some compatible server
> around.
>
> I have new Debian virtual machine with Postgres 12  .
>
> Debian does not offer to install Postgres 9.3 into it. How to install
> postgres 9.3 in new Debian ?
>

You'll have to compile it.


-- 
Guillaume.

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: How to recover data from 9.3 data directory
  2021-03-13 13:28 How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 13:45 ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 14:02   ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 14:11     ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 14:18       ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 14:42         ` Re: How to recover data from 9.3 data directory Guillaume Lelarge <guillaume@lelarge.info>
@ 2021-03-13 15:25           ` Andrus <kobruleht2@hot.ee>
  2021-03-13 16:17             ` Re: How to recover data from 9.3 data directory Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 11+ messages in thread

From: Andrus @ 2021-03-13 15:25 UTC (permalink / raw)
  To: Guillaume Lelarge <guillaume@lelarge.info>; +Cc: Julien Rouhaud <rjuju123@gmail.com>; pgsql-general

Hi!

 >Debian does not offer to install Postgres 9.3 into it. How to install 
postgres 9.3 in new Debian ?

>
> >You'll have to compile it.

Enterpisedb offers 9.3 download for Linux in 
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

Maybe it is possible to install it in new Debian ?

Or is it possible to download ISO image with Postgres 9.3 installed ?

Or should I try to find old Debian ISO image and install it into this?

Andrus.

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: How to recover data from 9.3 data directory
  2021-03-13 13:28 How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 13:45 ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 14:02   ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 14:11     ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 14:18       ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 14:42         ` Re: How to recover data from 9.3 data directory Guillaume Lelarge <guillaume@lelarge.info>
  2021-03-13 15:25           ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
@ 2021-03-13 16:17             ` Adrian Klaver <adrian.klaver@aklaver.com>
  2021-03-13 16:18               ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  0 siblings, 1 reply; 11+ messages in thread

From: Adrian Klaver @ 2021-03-13 16:17 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; Guillaume Lelarge <guillaume@lelarge.info>; +Cc: Julien Rouhaud <rjuju123@gmail.com>; pgsql-general

On 3/13/21 7:25 AM, Andrus wrote:
> Hi!
> 
>  >Debian does not offer to install Postgres 9.3 into it. How to install 
> postgres 9.3 in new Debian ?
> 
>>
>> >You'll have to compile it.
> 
> Enterpisedb offers 9.3 download for Linux in 
> https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
> 
> Maybe it is possible to install it in new Debian ?
> 
> Or is it possible to download ISO image with Postgres 9.3 installed ?
> 
> Or should I try to find old Debian ISO image and install it into this?

Or you could just use the the Postgres APT repo, as example:

https://apt.postgresql.org/pub/repos/apt/dists/stretch-pgdg/9.3/


> 
> Andrus.


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: How to recover data from 9.3 data directory
  2021-03-13 13:28 How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 13:45 ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 14:02   ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 14:11     ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 14:18       ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 14:42         ` Re: How to recover data from 9.3 data directory Guillaume Lelarge <guillaume@lelarge.info>
  2021-03-13 15:25           ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 16:17             ` Re: How to recover data from 9.3 data directory Adrian Klaver <adrian.klaver@aklaver.com>
@ 2021-03-13 16:18               ` Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 20:04                 ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  0 siblings, 1 reply; 11+ messages in thread

From: Julien Rouhaud @ 2021-03-13 16:18 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: Andrus <kobruleht2@hot.ee>; Guillaume Lelarge <guillaume@lelarge.info>; pgsql-general

Le dim. 14 mars 2021 à 00:17, Adrian Klaver <adrian.klaver@aklaver.com> a
écrit :

> On 3/13/21 7:25 AM, Andrus wrote:
> > Hi!
> >
> >  >Debian does not offer to install Postgres 9.3 into it. How to install
> > postgres 9.3 in new Debian ?
> >
> >>
> >> >You'll have to compile it.
> >
> > Enterpisedb offers 9.3 download for Linux in
> > https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
> >
> > Maybe it is possible to install it in new Debian ?
> >
> > Or is it possible to download ISO image with Postgres 9.3 installed ?
> >
> > Or should I try to find old Debian ISO image and install it into this?
>
> Or you could just use the the Postgres APT repo, as example:
>
> https://apt.postgresql.org/pub/repos/apt/dists/stretch-pgdg/9.3/


see also
https://wiki.postgresql.org/wiki/Apt/FAQ#Where_are_older_versions_of_the_packages.3F

>
>

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: How to recover data from 9.3 data directory
  2021-03-13 13:28 How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 13:45 ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 14:02   ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 14:11     ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 14:18       ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 14:42         ` Re: How to recover data from 9.3 data directory Guillaume Lelarge <guillaume@lelarge.info>
  2021-03-13 15:25           ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 16:17             ` Re: How to recover data from 9.3 data directory Adrian Klaver <adrian.klaver@aklaver.com>
  2021-03-13 16:18               ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
@ 2021-03-13 20:04                 ` Andrus <kobruleht2@hot.ee>
  2021-03-13 20:22                   ` Re: How to recover data from 9.3 data directory Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 11+ messages in thread

From: Andrus @ 2021-03-13 20:04 UTC (permalink / raw)
  To: Julien Rouhaud <rjuju123@gmail.com>; Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: Guillaume Lelarge <guillaume@lelarge.info>; pgsql-general


>     Or you could just use the the Postgres APT repo, as example:
>
>     https://apt.postgresql.org/pub/repos/apt/dists/stretch-pgdg/9.3/
>     <https://apt.postgresql.org/pub/repos/apt/dists/stretch-pgdg/9.3/;
>
>
> see also 
> https://wiki.postgresql.org/wiki/Apt/FAQ#Where_are_older_versions_of_the_packages.3F 
> <https://wiki.postgresql.org/wiki/Apt/FAQ#Where_are_older_versions_of_the_packages.3F;
>
>
I discovered that Debian allows to install 9.3 side-by side with 12

apt-get install postgresql-9.3

Andrus.

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: How to recover data from 9.3 data directory
  2021-03-13 13:28 How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 13:45 ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 14:02   ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 14:11     ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 14:18       ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 14:42         ` Re: How to recover data from 9.3 data directory Guillaume Lelarge <guillaume@lelarge.info>
  2021-03-13 15:25           ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
  2021-03-13 16:17             ` Re: How to recover data from 9.3 data directory Adrian Klaver <adrian.klaver@aklaver.com>
  2021-03-13 16:18               ` Re: How to recover data from 9.3 data directory Julien Rouhaud <rjuju123@gmail.com>
  2021-03-13 20:04                 ` Re: How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
@ 2021-03-13 20:22                   ` Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 0 replies; 11+ messages in thread

From: Adrian Klaver @ 2021-03-13 20:22 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; Julien Rouhaud <rjuju123@gmail.com>; +Cc: Guillaume Lelarge <guillaume@lelarge.info>; pgsql-general

On 3/13/21 12:04 PM, Andrus wrote:
> 
>>     Or you could just use the the Postgres APT repo, as example:
>>
>>     https://apt.postgresql.org/pub/repos/apt/dists/stretch-pgdg/9.3/
>>     <https://apt.postgresql.org/pub/repos/apt/dists/stretch-pgdg/9.3/;
>>
>>
>> see also 
>> https://wiki.postgresql.org/wiki/Apt/FAQ#Where_are_older_versions_of_the_packages.3F 
>> <https://wiki.postgresql.org/wiki/Apt/FAQ#Where_are_older_versions_of_the_packages.3F;
>>
>>
> I discovered that Debian allows to install 9.3 side-by side with 12

As long as you are using the PGDG(Postgres) repos and Debian versions 
listed here:

https://www.postgresql.org/download/linux/debian/#apt

> 
> apt-get install postgresql-9.3
> 
> Andrus.
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 11+ messages in thread


end of thread, other threads:[~2021-03-13 20:22 UTC | newest]

Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-03-13 13:28 How to recover data from 9.3 data directory Andrus <kobruleht2@hot.ee>
2021-03-13 13:45 ` Julien Rouhaud <rjuju123@gmail.com>
2021-03-13 14:02   ` Andrus <kobruleht2@hot.ee>
2021-03-13 14:11     ` Julien Rouhaud <rjuju123@gmail.com>
2021-03-13 14:18       ` Andrus <kobruleht2@hot.ee>
2021-03-13 14:42         ` Guillaume Lelarge <guillaume@lelarge.info>
2021-03-13 15:25           ` Andrus <kobruleht2@hot.ee>
2021-03-13 16:17             ` Adrian Klaver <adrian.klaver@aklaver.com>
2021-03-13 16:18               ` Julien Rouhaud <rjuju123@gmail.com>
2021-03-13 20:04                 ` Andrus <kobruleht2@hot.ee>
2021-03-13 20:22                   ` Adrian Klaver <adrian.klaver@aklaver.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox