Create upgrade.sh

This commit is contained in:
Olivier DEBAUCHE authored and GitHub committed 2021-12-27 11:21:16 +01:00
1 parent fa8a231dda
commit 5e9212f9cc
1 file changed
+19
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
set -x
docker run --rm \
-v /${CWD}://tmp \
-v openstreetmap-data://var/lib/postgresql/12/main \
-w //tmp \
postgres:12 \
pg_dumpall -c -v -U prostgres > dump.sql
docker run --rm \
-v /${CWD}://tmp \
-v openstreetmap-data://var/lib/postgresql/13/main \
-w //tmp \
postgres:13 \
psql -U postgres -d gis < dump.sql
rm ./dump.sql