]> Git — Sourcephile - gargantext.git/blob - devops/debian/install-postgres
[test] dad gitlab-ci
[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}