|
@@ -39,6 +39,35 @@ Check if database runs:
|
|
|
labkeyDocker/bin/stopLabkey.sh
|
|
labkeyDocker/bin/stopLabkey.sh
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
+#### Upgrade database
|
|
|
|
|
+
|
|
|
|
|
+ ```bash
|
|
|
|
|
+ $ bin/stopLabkey.sh
|
|
|
|
|
+ $ bin/startPGonly.sh
|
|
|
|
|
+ $ docker network inspect labkey_network
|
|
|
|
|
+#find IP of config-labkey-db-1
|
|
|
|
|
+ $ pg_dumpall -h IP -p 5432 -U postgres > /data/labkey/postgresql/X/dumpX.sql
|
|
|
|
|
+#type password several times
|
|
|
|
|
+ $ bin/stopLabkey.sh
|
|
|
|
|
+ $ mkdir /data/labkey/postgresql/Y/main
|
|
|
|
|
+#edit bin/env.sh so that $POSTGRESSDIR points to newly created dir
|
|
|
|
|
+#and DB_DOCKERFILE=$LBDOCKER/config/db/DockerfileY
|
|
|
|
|
+#change config/db/DockerfileY so it uses postgresql:Y
|
|
|
|
|
+ $ bin/buildPGonly.sh
|
|
|
|
|
+#by default, new image is named config-labkey-db:latest, and old image is now tag-less
|
|
|
|
|
+#consider retagging old image via docker tag OLDIMAGEID config-labkey-db:X
|
|
|
|
|
+ $ bin/startPGonly.sh
|
|
|
|
|
+#creates a new empty database at the new location
|
|
|
|
|
+#stop newly running server to corrects settings for import (we should clear password requirement)
|
|
|
|
|
+ $ bin/stopLabkey.sh
|
|
|
|
|
+ $ vi /data/labkey/postgresql/Y/main/pg_hba.conf
|
|
|
|
|
+#comment out host all all all scram-sha-256 and replace it with host all all all trust
|
|
|
|
|
+ $ bin/startPGAonly.sh
|
|
|
|
|
+ $ docker network inspect labkey_network
|
|
|
|
|
+#find IP of DB (probably the same as before)
|
|
|
|
|
+ $ psql -U postgres -h IP -p 5432 -f /data/labkey/postgresql/X/dumpX.sql
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
### Files and external modules for LabKey
|
|
### Files and external modules for LabKey
|
|
|
|
|
|
|
|
The files and externalModules locations are set in `bin/env.sh`, see `bin/env.sh.sample`:
|
|
The files and externalModules locations are set in `bin/env.sh`, see `bin/env.sh.sample`:
|