Wiki source code of Modifier l'emplacement des fichiers de base de données DDAudit
Last modified by Aurelie Bertrand on 2025/12/19 11:11
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | By default, DDAudit database files are stored in the Tomcat working directory. In some configurations this path may not be the DigDash Enterprise installation directory. | ||
| 2 | |||
| 3 | For example, on Linux the Tomcat working directory may be the Tomcat installation folder (e.g. /var/lib/tomcatX), and user rights may prevent the server from writing and/or modifying files in this directory. In this case, DDAudit will not work. | ||
| 4 | |||
| 5 | Another example is under Windows, when Tomcat is started as a service, the DDAudit database files may be in the Windows/system32 directory. | ||
| 6 | |||
| 7 | See chapter "[[Externalizing parameters in a properties file>>path:/xwiki/wiki/dev/view/Digdash/deployment/configuration/advanced_system_guide/#externalisation]]"to perform the following operation. | ||
| 8 | |||
| 9 | You can change the location of the DDAudit database files as follows: | ||
| 10 | |||
| 11 | 1. Stop the DigDash Enterprise server | ||
| 12 | 1. Open the file <DigDash Enterprise installation directory>/digdash.properties. | ||
| 13 | 1*. Change the value of the parameter **audit.db.url** | ||
| 14 | from **jdbc:h2:DDAudit_${server.DomainName};AUTO_SERVER=TRUE** | ||
| 15 | to **jdbc:h2:file:/home/audit/DDAudit_${server.DomainName};AUTO_SERVER=TRUE** (pay attention to the "file:" inserted at the beginning of the URL). | ||
| 16 | 1. Check that the specified folder exists and move all existing **DDAudit*.db** files to the new location | ||
| 17 | 1. Start the DigDash Enterprise server | ||
| 18 | |||
| 19 | //Note: The audit.db.url, audit.db.user, audit.db.password and audit.db.tcpServer parameters can also be specified as JVM launch parameters, for example by adding to the JAVA_OPTS variable (setenv.bat, setenv.sh...) or in catalina.properties~:// | ||
| 20 | JAVA_OPTS=[...] -Daudit.db.url=jdbc:h2:file:/home/DDAudit;AUTO_SERVER=TRUE [...] | ||
| 21 | |||
| 22 | An alternative is to change the value of the **h2.baseDir** parameter, which changes the overall behaviour of the H2 databases (DDAudit, but also DDComments): | ||
| 23 | |||
| 24 | 1. Stop the DigDash Enterprise server | ||
| 25 | 1. Find and edit the **catalina.properties** file on the server (e.g. <DDE Install>/apache-tomcat/conf/catalina**.properties** on a Windows installation) | ||
| 26 | 1. Add the following line: **h2.baseDir=/the/new/path** | ||
| 27 | |||
| 28 | Note: This path must be an absolute path. | ||
| 29 | |||
| 30 | 1. Check that this folder exists and move all existing **DDAudit*.db** files to the new location. | ||
| 31 | 1. Start the DigDash Enterprise server. |