My biggest problem is that every time i turn off my laptop i lose all my data. I just started learning rails with postgres.
So how can i start and stop properly a postgres database on the terminal.
I'm on Mac OS X.
this is what i use to start it:
postgres -D /usr/local/var/postgres/data
and this to stop it:
rm -rf /usr/local/var/postgres && initdb /usr/local/var/postgres -E utf8 but i think what it does it removes it so i lose all my data