Migrating H2 database
The H2 database has been updated. Old H2 databases (Comments, DDAudit and DDDataEntry), created on a version prior to 2023R1, are not compatible with this version. You must therefore update them according to the following instructions.
Comments database
To update the Comments database, you can backup the database using the previous version of Digdash Enterprise, and restore it to the new version.
Backup before updating DigDash
- From the DigDash home page, go to Configuration then Backup management.
- Click the Backup button.
- In the login box, enter the user name and password.
➡ The Backup page opens. - In the Common server files section,display the files contained in Repository files.
- Check the Comments database checkbox.
- Click the Export button at the bottom of the window and then the Download the backup file button to get the backup file (.zip file).
Restore after updating DigDash
- From the DigDash home page, go to Configuration then Backup management.
- Click the Backup button.
- In the login box, enter the user name and password.
- Click Browse to retrieve the backup file and then click Upload...
➡ The Restore page opens. - Check the content and click the Validate button at the bottom of the page.
DDAudit Database
To update the DDAudit database, you must:
- Perform a migration according to the procedure detailed below.
- Update the DDAudit module:
If you have already deployed the module in a previous version, you must redeploy it since the installation of version 2023R1. See page Audit Module Deployment for more information.
Before updating DigDash
- Stop the Tomcat server.
- Locate and backup your current h2 database (for example: DDAudit_ddenterpriseapi.mv.db) to a secure folder.
- Save the h2-1.4.195.jar file located in your current webapp folder ddenterpriseapi/WEB-INF/lib to a secure folder.
- Export your current database to a SQL file using our h2migrate tool and the old H2 jar file (h2-1.4.195.jar) you saved earlier.
To do this, in a command prompt, go to the h2migrate.jar file directory <DDInstall>/add-ons/ddaudit and execute the following command:- On Linux :
java -cp "h2migrate.jar:/path/to/h2-1.4.195.jar" com.digdash.tools.h2migrate.H2Export -url
"jdbc:h2:file:/path/to/DDAudit_ddenterpriseapi" -user sa -password sa -script ddaudit.sql
- On Windows :
java -cp "h2migrate.jar;/path/to/h2-1.4.195.jar" com.digdash.tools.h2migrate.H2Export -url
"jdbc:h2:file:/path/to/DDAudit_ddenterpriseapi" -user sa -password sa -script ddaudit.sql
- On Linux :
➡ The ddaudit.sql file is generated in the folder <DDInstall>/add-ons/ddaudit.
- Copy it to a secure location.
After updating DigDash
After updating DigDash and restarting the Tomcat server, you have the new version of the H2 file (h2-2.1.214.jar) in your webapp folder ddenterpriseapi/WEB-INF/lib.
- Import your current database from the previously generated SQL file using our h2migrate tool and the new H2 jar file (h2-2.1.214.jar).To do this, in a command prompt, go to the h2migrate.jar file directory <DDInstall>/add-ons/ddaudit and execute the following command:
- On Linux :
java -cp "h2migrate.jar:/path/to/h2-2.1.214.jar" com.digdash.tools.h2migrate.H2Import -url
"jdbc:h2:file:/path/to/DDAudit_ddenterpriseapi" -user sa -password sa -script ddaudit.sql - On Windows :java -cp "h2migrate.jar;/path/to/h2-2.1.214.jar" com.digdash.tools.h2migrate.H2Import -url
"jdbc:h2:file:/path/to/DDAudit_ddenterpriseapi" -user sa -password sa -script ddaudit.sql
- On Linux :
DDEntry database
To update the DDEntry database, you must perform a migration according to the procedure detailed below.
Before updating DigDash
- Stop the Tomcat server.
- Locate and backup your current h2 database (for example: DDEntry_ddenterpriseapi.mv.db) to a secure folder.
- Save the h2-1.4.195.jar file located in your current webapp folder ddenterpriseapi/WEB-INF/lib to a secure folder.
- Export your current database to a SQL file using our h2migrate tool and the old H2 jar file (h2-1.4.195.jar) you saved earlier. To do this, in a command prompt, go to the h2migrate.jar file directory <DDInstall>/add-ons/ddaudit and execute the following command:
- On Linux :
java -cp "h2migrate.jar:/path/to/h2-1.4.195.jar" com.digdash.tools.h2migrate.H2Export -url
"jdbc:h2:file:/path/to/DDEntry_ddenterpriseapi" -user sa -password sa -script ddentry.sql
- On Windows :
java -cp "h2migrate.jar;/path/to/h2-1.4.195.jar" com.digdash.tools.h2migrate.H2Export -url
"jdbc:h2:file:/path/to/DDEntry_ddenterpriseapi" -user sa -password sa -script ddentry.sql
- On Linux :
➡ The ddentry.sql file is generated in the folder<DDInstall>/add-ons/ddaudit.
- Copy it to a secure location.
After updating DigDash
After updating DigDash and restarting the Tomcat server, you have the new version of the H2 file (h2-2.1.214.jar) in your webapp denterpriseapi/WEB-INF/lib folder.
- Import your current database from the previously generated SQL file using our h2migrate tool and the new H2 jar file (h2-2.1.214.jar).To do this, in a command prompt, go to the h2migrate.jar file directory <DDInstall>/add-ons/ddaudit and execute the following command:
- Sur Linux :
java -cp "h2migrate.jar:/path/to/h2-2.1.214.jar" com.digdash.tools.h2migrate.H2Import -url
"jdbc:h2:file:/path/to/DDEntry_ddenterpriseapi" -user sa -password sa -script ddentry.sql - Sur Windows :
java -cp "h2migrate.jar;/path/to/h2-2.1.214.jar" com.digdash.tools.h2migrate.H2Import -url
"jdbc:h2:file:/path/to/DDAudit_ddenterpriseapi" -user sa -password sa -script ddentry.sql
- Sur Linux :