We upgraded our database since our release 5.174 from PostgreSQL version 9.5 to version 15.
In order to install the update package “Release 5.175” (and future release versions, too), your database needs to be upgraded.
The following guide will help you perform both the database upgrade using the relevant scripts provided in the metasfresh-docker repository, specifically in the “extras” directory (see also instructions below), and the metasfresh update to the release version 5.175.
The main script executing the database upgrade (upgrade_postgres.sh
) comprises the following actions:
newdb
) in a new database volume.db
=> olddb
) and the new volume (newdb
=> db
).metasfresh-docker
/volumes/db
.
Note: During the upgrade, your existing database will be duplicated (hence the required increased storage space) and preserved as a backup, so all your data is safe.
cd ./extras
Adjust the Postgres password in the docker-compose files to match the Postgres password of your instance. To do so, please proceed as follows:
docker-compose-before-upgrade-postgres.yml
docker-compose-upgrade-postgres.yml
docker-compose-after-upgrade-postgres.yml
nohup bash ./upgrade_postgres.sh
tail -f nohup.out
shm_size: 256m
to your database in the docker-compose.yml
file.5.175
.metasfresh-docker
directory).
# go back to metasfresh-docker
cd ..
docker-compose build --no-cache
docker-compose_v3.yml
and add your custom changes there.Special Note: |
---|
If the upgrade fails the new database volume (newdb ) will be removed and your instance with your original database (backup) can be restarted and used as usual. No data will be lost.After resolving the conflicts, the upgrade process can be started anew. Only after a successful upgrade, both the original and the new databases are renamed and indexed accordingly. The original database is retained as a backup. |
docker-compose up -d
If you have any questions, you can contact us via our metasfresh Community Forum.