Created
August 15, 2015 14:23
-
-
Save LukasRychtecky/a6419f0170d1ce274f8f to your computer and use it in GitHub Desktop.
Moves PostgreSQL's data directory into new direction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo su - postgres | |
service postgresql stop | |
mv /var/lib/postgresql /srv/postgresql | |
sudo chown -R postgres:postgres /srv/postgres/ | |
ln -s /srv/postgresql /var/lib/postgresql | |
chown -R postgres:postgres /var/lib/postgresql | |
service postgresql start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment