]> Git — Sourcephile - gargantext.git/blob - devops/debian/install-postgres
[FIX] memory leak, useable ngrams table version (WIP)
[gargantext.git] / devops / debian / install-postgres
1 #!/bin/bash
2
3 PGVersion=11
4 GARGDATA=/srv/gargantua/gargandata
5 sudo mkdir -vp ${GARGDATA}
6 sudo apt install rsync
7 sudo sed -iP "s%^data_directory.*%data_directory = \'${GARGDATA}\'%" /etc/postgresql/${PGVersion}/main/postgresql.conf
8 sudo rsync -av /var/lib/postgresql/${PGVersion}/main ${GARGDATA}
9 sudo chown -R postgres:postgres ${GARGDATA}