Thread
-
How to recover data from 9.3 data directory
Andrus <kobruleht2@hot.ee> — 2021-03-13T13:28:37Z
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.
-
Re: How to recover data from 9.3 data directory
Julien Rouhaud <rjuju123@gmail.com> — 2021-03-13T13:45:52Z
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. >
-
Re: How to recover data from 9.3 data directory
Andrus <kobruleht2@hot.ee> — 2021-03-13T14:02:19Z
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.
-
Re: How to recover data from 9.3 data directory
Julien Rouhaud <rjuju123@gmail.com> — 2021-03-13T14:11:45Z
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. >
-
Re: How to recover data from 9.3 data directory
Andrus <kobruleht2@hot.ee> — 2021-03-13T14:18:37Z
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. -
Re: How to recover data from 9.3 data directory
Guillaume Lelarge <guillaume@lelarge.info> — 2021-03-13T14:42:14Z
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.
-
Re: How to recover data from 9.3 data directory
Andrus <kobruleht2@hot.ee> — 2021-03-13T15:25:10Z
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.
-
Re: How to recover data from 9.3 data directory
Adrian Klaver <adrian.klaver@aklaver.com> — 2021-03-13T16:17:00Z
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
-
Re: How to recover data from 9.3 data directory
Julien Rouhaud <rjuju123@gmail.com> — 2021-03-13T16:18:08Z
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 > >
-
Re: How to recover data from 9.3 data directory
Andrus <kobruleht2@hot.ee> — 2021-03-13T20:04:45Z
> 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.
-
Re: How to recover data from 9.3 data directory
Adrian Klaver <adrian.klaver@aklaver.com> — 2021-03-13T20:22:56Z
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