]> Git — Sourcephile - gargantext.git/blob - devops/debian/install-postgres
Merge branch 'dev-phylo' of ssh://gitlab.iscpif.fr:20022/gargantext/haskell-gargantex...
[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}