Thread: Restoring database from old DATA folder
I have a DATA folder of my previous PostgreSQL 8.1 (Windows XP) installation. I do not have any DUMP or other backups. I want to use this folder instead of the newly created DATA folder after new installtion. I tried replacing the new folder with the old folder, but it did not work. pgAdmin also stopped working. I want to know how to recover the database from a DATA folder in case of worst situations if no backups are available. -- View this message in context: http://www.nabble.com/Restoring-database-from-old-DATA-folder-tf2070639.html#a5700598 Sent from the PostgreSQL - general forum at Nabble.com.
# rohitprakash123@indiatimes.com / 2006-08-07 22:17:26 -0700: > > I have a DATA folder of my previous PostgreSQL 8.1 (Windows XP) installation. > I do not have any DUMP or other backups. I want to use this folder instead > of the newly created DATA folder after new installtion. > > I tried replacing the new folder with the old folder, but it did not work. > pgAdmin also stopped working. Was the old postgres stopped when you created the copy? Was the new postgres stopped when you put the copy in? Did you restore correct permissions when you put the copy in? Is the new install the same version of postgres as the old one? What are the error messages? > I want to know how to recover the database from a DATA folder in case of > worst situations if no backups are available. http://www.postgresql.org/docs/8.1/static/backup-file.html http://www.postgresql.org/docs/8.1/static/migration.html -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991
> Was the old postgres stopped when you created the copy? > Was the new postgres stopped when you put the copy in? > Did you restore correct permissions when you put the copy in? > Is the new install the same version of postgres as the old one? > What are the error messages? I tried to modify the parameters of the .CONF file when the pgsql-8.1 service was running. The next time I started, it displayed error: "The service did not listen to local host". (something like this). So I copied the old DATA folder and un-installed PostgreSQL. I again re-installed it and replace the new DATA folder with the old one. Both previous and new are same versions and same settings were used during installation. -- View this message in context: http://www.nabble.com/Restoring-database-from-old-DATA-folder-tf2070639.html#a5711630 Sent from the PostgreSQL - general forum at Nabble.com.
I tried to modify the parameters of the .CONF file when the pgsql-8.1
service was running. The next time I started, it displayed error: "The
service did not listen to local host". (something like this).
If you were to do a"su - postgres -c "pg_ctl -D <db directory location> start" what error information does it show?
Steve
In article <5711630.post@talk.nabble.com>, RPK <rohitprakash123@indiatimes.com> wrote: % I tried to modify the parameters of the .CONF file when the pgsql-8.1 % service was running. The next time I started, it displayed error: "The % service did not listen to local host". (something like this). % % So I copied the old DATA folder and un-installed PostgreSQL. I again % re-installed it and replace the new DATA folder with the old one. Both % previous and new are same versions and same settings were used during % installation. I think what you need to do is to fix whatever's wrong with your config file. When you made a copy of the old data folder, you copied the config file with it. When you restored the copy, you restored the config file. Do you have a copy of the version that was used the last time the database started? From what you've said so far, I suggest you search for listen_addresses and set it to '*'. If the database doesn't start, I strongly suggest you look in the log for the error messages and report them verbatim to the list. -- Patrick TJ McPhee North York Canada ptjm@interlog.com