Chapter 20. Using an External Database

Table of Contents

20.1. Supported Databases
20.2. Migrating to an External Database
20.2.1. Step 1 - Stop SavaPage
20.2.2. Step 2 - Create a Backup
20.2.3. Step 3 - Create new Database in External DBMS
20.2.4. Step 4 - Change SavaPage Connection Parameters
20.2.5. Step 5 - Initialize new Database
20.2.6. Step 6 - Restore Backup into new Database
20.2.7. Step 7 - Restart SavaPage

By default SavaPage is packaged with Apache Derby as internal database. This gives you the opportunity to evaluate SavaPage on a small scale right away. However, in a production environment with multiple users, we strongly advise you to use PostgreSQL as external database server.

Warning

Using the internal database in situations with multiple users and thus concurrent use, will inevitably lead to locking, deadlock and out-of-memory errors, which can make the system totally unresponsive. See our notes on Database Locking.

Other situations can be extra reason to choose for an external database, like:

This chapter describes how to connect and migrate to an external database. For database tuning, see Section 12.5.3, “Database Connection Settings”.

20.1. Supported Databases

SavaPage is able to use any database that has a JDBC driver available that is supported by Hibernate Dialects[40]. However, PostgreSQL on GNU/Linux servers is our first choice. PostgreSQL is designed to be highly scalable, is optimized for concurrent use, and handles datasets of any size efficiently. It behave robust with thousands of users and is very well suited for large scale SavaPage implementations. Above that, PostgreSQL is Free and Open Source software, and complies to Open Standards.

Note

Of course it is possible to connect SavaPage to your existing database infrastructure other than PostgreSQL. For example, an Oracle JDBC connection template is present in /opt/savapage/server/server.properties. Please contact your SavaPage Community Representative to assist you with configuring alternative connections.



[40] Hibernate is an object-relational mapping tool for the Java programming language. It provides a framework for mapping an object-oriented domain model to a relational database. Hibernate supports several SQL Dialects. Each dialect specifies the database type and is responsible for connecting to the database and generating the appropriate SQL statements.