Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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).

share|improve this answer
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 – RafaelOrtiz Nov 26 '10 at 16:25
i was forgetting the pid file.. – RafaelOrtiz Nov 26 '10 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 – RafaelOrtiz Nov 27 '10 at 14:53
See: "man psql". – Khaled Nov 27 '10 at 14:56
psql seems to be seeing only 8.4 dbs and not 8.2 ones..:( . – RafaelOrtiz Dec 7 '10 at 20:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.