]> Git — Sourcephile - gargantext.git/blob - devops/debian/install-postgres
[VERSION] +1 to 0.0.6.9.9.2
[gargantext.git] / devops / debian / install-postgres
1 #!/bin/bash
2
3 PGVersion=13
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}