×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Help Importing datafile

Help Importing datafile

Help Importing datafile

(OP)
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!

RE: Help Importing datafile

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: http://home.arcor.de/hirnstrom/bewerbung

RE: Help Importing datafile

(OP)
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!

RE: Help Importing datafile

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

RE: Help Importing datafile

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

RE: Help Importing datafile

CODE

psql -l
lists all available databases on your machine.

CODE

psql -l -h 192.168.101.8
lists them on a different host (maybe - if you're allowed).

don't visit my homepage: http://home.arcor.de/hirnstrom/bewerbung

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close