Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy Database from Linux to Windows 1

Status
Not open for further replies.

ca8msm

Programmer
May 9, 2002
11,327
0
0
GB
Hi,

I've been asked to help out in attempting to retrieve some data from a PostgreSQL server that was based in a linux environment. All I've been told is that there is a problem with booting up the machine so that it can't even get past the boot up screen.

What I would like to to (if possible) is to take the hard disk out of the server and add it into one of our windows machines in order to examine the files. I would then (in theory) extract the database files, create a PostgreSQL server on Windows and then load the database onto the server to examine the data in the database.

Does anyone know if this is even possible, and if so what would I need to look for on the disk in order to extract the database?

Thanks,
Mark

Mark,

Darlington Web Design[tab]|[tab]Experts, Information, Ideas & Knowledge[tab]|[tab]ASP.NET Tips & Tricks
 
Hi

All data is stored in a directory. The usual default is /var/lib/pgsql/data/ , but that can be changed. See the PostgreSQL init script, the directory should be passed to [tt]pg_ctl[/tt] in its -D parameter.

The content of that directory is meaningful only for the PostgreSQL server, you can not extract the data without the server. No idea if a PostgreSQL for Windows can also handle those data, so I would do a backup copy first.


Feherke.
 
I woulnd't expect windows to be able to read the filesystem. Maybe it is an ext2-filesystem, where Windows-drivers exist, but not out of the box, to read it. But for reiserfs - are there windows-drivers to read them? Maybe it is even another filesystem.

However, if you put the drive into the windows-machine, which might happen to have a cd-drive, then you can download a linux-live-cd, burn it, and install - sorry - and boot the linux-live system, from which you can access the filesystem from the linux-machine.

don't visit my homepage:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top