What would I find in /var/lib/ directory?

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.


Solution 1:

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.

Solution 2:

/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.