0

From some reason we lost postgresql 8.2 in our server, we are using also postgresql 8.4 and all it's ok in this version, but we lost all data of postgresql 8.2, i managed to restore the files, but i dunno how to go from there to restore all the DB in this version,,

can anybody help me :)!

thanks in advance.

1 Answer 1

1

It is not clear from your question whether you have the data files or not. If you have them, you can just copy all database files to the data directory such as "/var/lib/postgresql/data". If you faced any trouble while restoring the data files because of version mismatch, you can simply upgrade/downgrade the database server to the needed version. This should not cause you problems as you are restoring the whole data directory and there is no need to worry about existing data.

The steps are as follow:

1- Shutdown your postgresql server if it is running.

2- Copy all files to the data dir.

3- Start your database server and check your data.

You have to be careful about the source and destination platform of the data files. Previously, I tried to copy the data directory from one system to another, but it fails because of platform mismatch (32-bit system and 64-bit system).

5
  • Hi khaled thanks for your answer, i got all the data files , i did as you described before and while trying to start postgres 8.2 i got no msg from the shell..for example * Starting PostgreSQL 8.4 database server...that's what i got starting 8.4 but not 8.2 Nov 26, 2010 at 16:25
  • i was forgetting the pid file.. Nov 26, 2010 at 16:53
  • Ok We managed to get postgres-8.2 running from the files, but psql version is 8.4, how can i use psql to see all the DBs in postgres 8.2 Nov 27, 2010 at 14:53
  • See: "man psql".
    – Khaled
    Nov 27, 2010 at 14:56
  • psql seems to be seeing only 8.4 dbs and not 8.2 ones..:( . Dec 7, 2010 at 20:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .