H2 Database Upgrade
The H2 database must be upgraded before installing MFT Server version 2024.2. Any MFT Server versions that use an H2 database and H2-1.4.199.jar should be migrated to 2_X. Below you will find upgrade instructions. Please note that the built-in H2 database is not recommended for use in an MFT Server production environment. See Datastore where this is discussed.
Execute the steps to upgrade an H2 database from 1_X to 2_X.
Old version
Create a folder named “database” and create two subfolders named “new” and “old” in your user home directory, as shown below.
![]()
Stop the MFT Server.
Copy the file “server.mv.db” from the MFT Server installation-path/data folder to your user-home-directory/database/old.
Navigate to the MFT Server installation-path/libs.
Next, you will be entering a command, which differs slightly based on the OS your MFT Server is installed on. See the appropriate OS heading below.
Windows
The <user-home-dir>, which is specified in the command below, is the path of the folder where the “new” and “old” directories were created. For example, if the “new” and “old” subfolders were created in C:\Users\<user-name>\database, then the <user-home-dir> will be C:\Users\<user-name>
Enter the command as follows:
java -cp h2-x.x.xxx.jar org.h2.tools.Script -url jdbc:h2:<user-home-dir>\database\old\server -user server -password server -script <user-home-dir>\database\backup.zip -options compression zip
Examples:
java -cp h2-2.1.214.jar org.h2.tools.Script -url jdbc:h2:<user-home-dir>\database\old\server -user server -password server -script <user-home-dir>\database\backup.zip -options compression zip
java -cp h2-1.4.199.jar org.h2.tools.Script -url jdbc:h2:<user-home-dir>\database\old\server -user server -password server -script <user-home-dir>\database\backup.zip -options compression zip
The above command creates a file named backup.zip in <user-home-dir>\database folder.
Linux
The <user-home-dir>, which is specified in the command below, is the path of the folder where the “new” and “old” directories were created. If the “new” and “old” are created in /home/<user-name>/database, then the <user-home-dir> will be /home/<user-name>
Enter the command as follows:
java -cp h2-x.x.xxx.jar org.h2.tools.Script -url jdbc:h2:<user-home-dir>/database/old/server -user server -password server -script <user-home-dir>/database/backup.zip -options compression zip
Examples:
java -cp h2-2.1.214.jar org.h2.tools.Script -url jdbc:h2:<user-home-dir>/database/old/server -user server -password server -script <user-home-dir>/database/backup.zip -options compression zip
java -cp h2-1.4.199.jar org.h2.tools.Script -url jdbc:h2:<user-home-dir>/database/old/server -user server -password server -script <user-home-dir>/database/backup.zip -options compression zip
The above command creates a file named backup.zip in <user-home-dir>/database folder.
Notes
Replace the H2 version JAR found on installation-path/libs
Take a backup of the MFT-Server and uninstall it.
New version
Download the latest JSCAPE MFT Server software.
Install the latest version.
Navigate to the installation-path/data directory and delete all files (if any - this applies to installation-wizard installations).
Navigate to the installation-path/libs folder.
Next, you will be entering a command, which differs slightly based on the OS your MFT Server is installed on. See the appropriate OS heading below.
Windows
The <user-home-dir>, which is specified in the command below, is the path of the folder where the “new” and “old” directories were created. For example, if the “new” and “old” subfolders were created in C:\Users\<user-name>\database, then the <user-home-dir> will be C:\Users\<user-name>
Enter the following command:
java -cp h2-x.x.xxx.jar org.h2.tools.RunScript -url jdbc:h2:<user-home-dir>\database\new\server -user server -password server -script <user-home-dir>\database\backup.zip -options compression zip FROM_1X
Example:
java -cp h2-2.2.224.jar org.h2.tools.RunScript -url jdbc:h2:<user-home-dir>\database\new\server -user server -password server -script <user-home-dir>\database\backup.zip -options compression zip FROM_1X
The above command creates a database named “server.mv.db” in <user-home-dir>\database\new folder.
Linux
The <user-home-dir>, which is specified in the command below, is the path of the folder where the “new” and “old” directories were created. For example, If the “new” and “old” subfolders are created in /home/<user-name>/database, then the <user-home-dir> will be /home/<user-name>
Enter the following command:
java -cp h2-x.x.xxx.jar org.h2.tools.RunScript -url jdbc:h2:<user-home-dir>/database/new/server -user server -password server -script <user-home-dir>/database/backup.zip -options compression zip FROM_1X
Example:
java -cp h2-2.2.224.jar org.h2.tools.RunScript -url jdbc:h2:<user-home-dir>/database/new/server -user server -password server -script <user-home-dir>/database/backup.zip -options compression zip FROM_1X
The above command creates a database named “server.mv.db” in <user-home-dir>/database/new folder.
Note: Replace the H2 version JAR found in installation-path/libs
Navigate to the installation path/data folder (Create a directory named “data” if it does not exist).
Copy the “server.mv.db” file from <user-home-directory>/database/new to <mft-server-install-path>/data folder.
Copy the files below from the <old-installation-backup>/etc to the <new-installation>/etc folder.
database.properties
license.lic
Next, execute the command below (based on the OS MFT Server is installed on) from the current-installation-path.
Linux
./js-database-configuration -update -previous-version <version>
Examples:
./js-database-configuration -update -previous-version 12.5
./js-database-configuration -update -previous-version 2024.1
Windows
js-database-configuration.exe -update -previous-version <version>
Examples:
js-database-configuration.exe -update -previous-version 12.5
js-database-configuration.exe -update -previous-version 2024.1
Start the service.
Notes:
If the upgrade is done through windows installation wizard, the files under the data folder should be removed before moving to “New version”.
Always take a backup of old versions.