Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change postgresql database location that installed on macOS via homebrew

I have postgresql database that is installed on my macOS system drive via homebrew. The system drive is not so big and database is becoming bigger and bigger. I would like to move it to my big data drive if possible. I've found a manual for Ubuntu but it seems it does not fit my case. Because it says that postgresql.conf located in other directory than database itself. But homebrew's DB located at /usr/local/var/postgres with postgresql.conf in it. So I guess I can't just move /usr/local/var/postgres directory to another place because postgresql.conf will be inaccessible.

like image 754
C0DEF52 Avatar asked Aug 14 '17 07:08

C0DEF52


Video Answer


1 Answers

You could use ln to map in a directory from an external drive.

like image 144
Keith John Hutchison Avatar answered Oct 03 '22 03:10

Keith John Hutchison