Upgrading Geoweaver to Latest Version
Simple Upgrade
Python Way
If you installed Geoweaver via the Python way, you can upgrade Geoweaver by simply running:
gw start --force
The option --force
will ensure the newest Geoweaver jar is downloaded before starting.
Java Way
Upgrading Geoweaver to the latest version is a straightforward process. Follow these steps to perform a simple upgrade:
- Download the new version of Geoweaver’s JAR file:
wget https://github.com/ESIPFed/Geoweaver/releases/download/latest/geoweaver.jar
- Start Geoweaver with the updated JAR file:
java -jar geoweaver.jar
Complex Upgrade (Database Migration)
If you have been using Geoweaver for a while, it’s important to ensure the safety of your database during the upgrade. Geoweaver relies on the H2 database as its default database. In some cases, the new version of Geoweaver may introduce changes to the H2 database library for security reasons. In such scenarios, users may need to migrate their Geoweaver database.
The official documentation for H2 database migration is available here
Here are the steps to migrate your Geoweaver database:
- Begin by downloading the H2 database JAR file of both the old version and the current version. Replace
and respectively:
wget https://github.com/h2database/h2database/releases/download/version-<old_version>/h2-<old_version>.jar
wget https://github.com/h2database/h2database/releases/download/version-<new_version>/h2-<new_version>.jar
- Export your data into an SQL script. Make sure to replace
and with your specific information:
java -cp h2-<old_version>.jar org.h2.tools.Script -url jdbc:h2:~/h2/gw -user geoweaver -script old_gw_db.sql -password <DB_Password>
- Remove the old database files:
rm ~/h2/* -f
- Import the data back and create a new Geoweaver database. Use the following command, replacing
and with the appropriate values:
java -cp h2-<new_version>.jar org.h2.tools.RunScript -url jdbc:h2:~/h2/gw -user geoweaver -script old_gw_db.sql -password <DB_password>
- That’s it! Download the new version of the Geoweaver JAR file and restart. Your Geoweaver installation should now work as usual:
wget https://github.com/ESIPFed/Geoweaver/releases/download/latest/geoweaver.jar
java -jar geoweaver.jar
These steps should help you smoothly upgrade Geoweaver to the latest version while safeguarding your database. Any questions please feel free to report them here.