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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help Importing datafile

Status
Not open for further replies.

geps

Technical User
Oct 11, 2007
3
IT
Hi!
I'm very newbie about PostgreSQL, but I've a very great problem.
I've an application that runs over pg db, that produce huge quantity of logs stored in several binary files. I suspect that these are data file of PostgreSQL db, but I've no way to prove it certanly: there are 11 .index files (e.g. among them there is a masterChunk.index). Does exists a way to know if my souspicious is good? And if I was right, how can I import those files in a new pgsql installation?
Thank you for pay attention.
Regards!
 
To store and restore your database, you use pg_dump and pg_restore.
I don't have any masterChunk.index-file.

The data is stored under /var/lib/postgresql/8.1/main/global on my system, which is linux.

I'm not quiete certain, what you want to do.
You're talking about log-files (which normally aren't binary), binary files, and index-files (which aren't logfiles).
Datafiles are again a different thing.

The data is stored under /var/lib/postgresql/8.1/main/global on my system, which is linux.
Logfiles are in /var/log/postgresql.

For a new installation, you just need pg_dump -Fc, but read the manpage, and try it out, before deleting the old installation.


don't visit my homepage:
 
I'm not sure of what I have really :)
The system is propretary, and I know it uses PGSQL to store logs coming from another system, so I'm not talking about PG logs... the problem is that I don't know exactly how data are organized in these files, I want only try to understand wich type of file they are, and if can import inside a new db. Thank you for information!
bye!
 
you can restor postgres DB two ways dump / restore (as already pointed out)

and if you have the data files, then you need the same major postgres version (for the same computer arcitecture)

the way you describe, the files you have, do not look any like postgres files at all
 
Ok, let's suppose I can run the pg_dump command: I've seen that it needs at least a database name as parameter. How can I see wich database are available on my server? I think I need to log in with psql utiliy, but I don't know too much about it. I hope I can study this week end... if you can help please, I would be grateful...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top