1. Update translationstudio to the latest version
1.1. Backups
If you use translationstudio’s embedded database, please create a backup copy of the database ./data/translationstudio.mv.db
and check which version of H2 you are using. To find the version, simply search for ./lib/h2*.jar
and you will see the version in the file name.
If you find that the version of the update is different to your current H2 version, you have 2 options:
-
replace the newer H2 JAR file with your current version (i.e. keep the very same H2 version), see section "Downgrading embedded H2 databse"
-
migrate the database to the new version.
It might be that there are known CVEs for the H2 database. Usually, this should not expose any vulnerabilities, because
-
H2 does not run in server mode
-
no sensitive data is stored in the database
-
your translationstudio instance is only accessible from within your network
However, it is good security practice to be up to date and a dedicated section on updating the database
1.2. translationstudio Application
The update process is quite simple.
-
Stop the application
-
If necessary, migrate your database version or downgrad your H2 version (see sections below).
-
If necessary, migrate your custom JAR files from
./lib
to./lib-plugins
. -
Remove the JAR files from the
./lib
folder. -
Deploy all translationstudio JAR files from your installation package to the application’s folder.
-
Start translationstudio again.
Do not forget to update translationstudio.jar .
|
You can test if your update was successfully by starting translationstudio in console mode via ./translationstudio console
or by executing console.bat
.
It is a good idea to backup the translationstudio database and the configuration stored in the ./conf directory.
|
Please check if the file api-key.local
exists in your ./conf
directory. If it does not exist, translationstudio creates this file automatically.
The api key is necessary for FirstSpirit to send data to the translationstudio Application. |
1.3. Downgrading embedded H2 databse
If necessary, you may need to downgrade your H2 database version from 2.x to 1.4.196 again. The required JAR can be obtained from the public maven repository. Deploy your JAR to ./lib
and remove the existing h2.2.*.jar
.
1.4. Updating your embedded H2 database
Upgrading your database is simple, but it requires a few steps. You may want to download your database file to your local machine, since you will be needing your browser.
1.4.1. Preparation
-
Copy your "old" H2 JAR into your translationstudio’s
./data
folder. In the following, we will assume your "old" JAR ish2-1.4.196.jar
. -
Copy your "new" H2 JAR into your translationstudio’s
./data
folder. In the following, we will assume your "new" JAR ish2-2.2.224.jar
. -
Open a terminal and navigate to translationstudio’s
./data
folder.
1.4.2. Exporting your database
Run the following command to extract your database tables: java -cp ./h2-1.4.196.jar org.h2.tools.Recover
.
You will find a new text file translationstudio.h2.sql
.
1.4.3. Creating a new database and importing your data
You need to create a new database and import your extracted data. To do so, start H2 in server mode via the command java -jar h2-2.2.224.jar
. You can access the administration interface via localhost:8082
.
-
Change your JDBC URL from
jdbc:h2:~/whichevername
tojdbc:h2:./translationstudio_update
(Please be aware that you need to change the~
to a.
as well!) -
Click on the
connect
button. -
Quite prominent and at the center top, you will find a textarea into which you can copy and paste the content of the
.sql
file. -
To trigger the import, click on the
run
button above the text field. As a result, you should find a few new tables. -
Finally, disconnect from the database using the respective button - it should be the very first in the icon list at the top of your browser window.
1.5. translationstudio Connectors
Please make sure to also update any connector if necessary.
Unless you implemented your own connectors, the translationstudio connector’s will be updated automatically whenever you update the application.
Therefore, you are (usually) only required to install/update the connector’s FirstSpirit modules via the ServerManager application.