title: HyperSQL database in Tomcat is deleted after Linux restart
body: <p>I am using HyperSQL as database for my Tomcat app. The database server is running from my application and the location of files is in webapps/myapp-folder.</p>
  
  <p>Problem is, that after Linux (Centos 7) restart, the database collide somehow and the database is recreated (all data are deleted). If I restart only the Tomcat, everything is working fine.</p>
  
  <p>My tomcat.service:</p>
  
  <pre><code>[Unit]
  Description=Tomcat 8.5 servlet container
  After=syslog.target network.target
  
  [Service]
  Type=forking
  User=tomcat
  Group=tomcat
  
  Environment="CATALINA_BASE=/opt/tomcat"
  Environment="CATALINA_HOME=/opt/tomcat"
  Environment="CATALINA_PID=/opt/tomcat/temp/tomcat.pid"
  
  ExecStart=/opt/tomcat/bin/startup.sh
  ExecStop=/opt/tomcat/bin/shutdown.sh
  Restart=on-failure
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p>The database folder has full Create and delete rights and group and owner is tomcat user.</p>
  
  <p>The HSQL server is started, when my app starts and for working with database I am using Hibernate:</p>
  
  <pre><code>    Properties properties = new Properties();
      properties.setProperty(Environment.DRIVER, "org.hsqldb.jdbcDriver");
      properties.setProperty(Environment.URL, "jdbc:hsqldb:hsql://localhost:9001/my_repository"); 
      properties.setProperty(Environment.USER, xxx);
      properties.setProperty(Environment.PASS, yyy);
      properties.setProperty(Environment.DIALECT, "org.hibernate.dialect.HSQLDialect");
      properties.setProperty(Environment.HBM2DDL_AUTO, "update");
  </code></pre>
  
  <p>What could be wrong? Why the data are always deleted after PC restart?</p>
  
  <p>Thanks for any answer.</p>