CSSCurrent en:H2 Database

Aus Cryptshare Documentation
Wechseln zu:Navigation, Suche


Overview

With the update to 4.7.0.x the Cryptshare Server uses a H2 database for storing data. The database runs in embedded mode which means that it is managed by the Cryptshare Server process.

Please refer to Database Migration for detailed information about the migration process.

H2 Database

The H2 Database Engine, short H2, is a relational database management system available under the MPL 2.0 (Mozilla Public Licence Version 2.0) and under the EPL 1.0 (Eclipse Public Licence) written in Java. It is characterized by the following criteria:

  • A very high performance database engine
  • Open Source
  • Supports Standard SQL
  • User password authentication uses SHA-256 with salt
  • Low memory consumption, both for the database server and for the working memory during operation
  • Very well tested (high coverage of the source code with tests, load tests)
  • Widespread

Further information about the database can be found on the project homepage: https://www.h2database.com/html/features.html

Usage in the Cryptshare Server

Configuration

As the database is managed by the Cryptshare Server process, no specific configuration is necessary. However the database can be further optimized for a higher load. Please refer to the chapter "Database Connection Pool" in Advanced Cryptshare Configuration for further details.

Folder structure

The H2 database consists of a single file located in the subdirectory "db" which is named "cryptshare.mv.db". If this file does not exist, an empty database is created when the Cryptshare Server is started.

Database Backup

The database backup consists of 2 SQL files, one for the schema (schema.sql) and one for the data (imports.sql), which are part of the backup package generated by the Cryptshare Server.

Restoring the database from Backup

When a database backup is restored, the current database is erased (data and schema) and the schema and data is recreated from the backup files. The database file itself remains on the file system during the process.