Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to do some detective work and am hunting down a PostgreSQL installation.

I've only got some low level access and cannot see inside the folder, but have found this likely candidate

/var/lib/pgsql/

Do you think my search is over?

Do you think my data is in there too?

I realise this is a highly stupid and speculative question. But I'm after a good guess.

share|improve this question
    
It would be a lot less speculative if you told us how postgres ended up on the system. Was it compiled and installed manually? Or with a package manager? What Linux distro is this? –  innaM Aug 10 '09 at 15:36
    
It was installed as part of another piece of software called Lyris Listmanager. I believe this is the flavour Red Hat Linux 7.3 with PostgreSQL 7.3.2 –  in.spite Aug 11 '09 at 7:08

2 Answers 2

up vote 7 down vote accepted

For a description of what usually ends up in the /Var directory: http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/Linux-Filesystem-Hierarchy.html#var

/var/lib

Holds dynamic data libraries/files like the rpm/dpkg database and game scores. Furthermore, this hierarchy holds state information pertaining to an application or the system. State information is data that programs modify while they run, and that pertains to one specific host. Users shouldn't ever need to modify files in /var/lib to configure a package's operation. State information is generally used to preserve the condition of an application (or a group of inter-related applications) between invocations and between different instances of the same application. An application (or a group of inter-related applications) use a subdirectory of /var/lib for their data. There is one subdirectory, /var/lib/misc, which is intended for state files that don't need a subdirectory; the other subdirectories should only be present if the application in question is included in the distribution. /var/lib/'name' is the location that must be used for all distribution packaging support. Different distributions may use different names, of course.

I would bet your data is in there, but not the executable files.

share|improve this answer

/var/lib/pgsql is where Postgres stores all its internal data, including the data you put into a database. It's not, however, in a format that anybody could really see. Unlike MySQL which makes a separate file for each file and index, PostgreSQL stores its data in files with numeric names and in a dense opaque binary format.

share|improve this answer

Your Answer

 
discard

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.