How can I find where Postgres 8.x database files are saved in Ubuntu 10.04 file system?
You can now locate the Postgres Database files by navigating the directory that was displayed. However, the PostgreSQL configuration directory in Ubuntu is located in /etc/postgresql/10/main .
All the data needed for a database cluster is stored within the cluster's data directory, commonly referred to as PGDATA (after the name of the environment variable that can be used to define it). A common location for PGDATA is /var/lib/pgsql/data.
By default, the data_directory is set to /var/lib/postgresql/10/main in the /etc/postgresql/10/main/postgresql. conf file.
In the postgres prompt, just execute this query:
SHOW data_directory;
Check also the Ubuntu manual: https://help.ubuntu.com/10.04/serverguide/C/postgresql.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With