Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am working on this new ubuntu 12.04 server and I need to work on the Postgres database which is PostGIS enabled. The problem is I am not sure how to locate the database using command line.

It is already installed on the server. I just need to locate it. How do I locate it?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Look in the file /etc/postgresql/9.1/main/postgresql.conf and in the section under the title "FILE LOCATIONS". For instance:

data_directory = '/var/lib/postgresql/9.1/main'  

is what I have.

share|improve this answer
    
thanks found it –  Sam007 Nov 21 '12 at 22:12
    
Alternately you can connect to it and run SHOW data_directory; –  Craig Ringer Nov 22 '12 at 1:15
add comment

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.