convert_roundcube_mysql2sqlite script updates the Roundcube configuration to use individual SQLite databases instead of a single MySQL® database. This document explains how to use that script.
If you change Roundcube's database engine to SQLite, you cannot change it back to MySQL.
Benefits of Roundcube with SQLite databases
The SQLite database provides the following benefits over MySQL:
- You can restore Roundcube data more easily. The system stores each email user's Roundcube data in a separate SQLite database file. This allows you to restore data for a single user and not impact the whole server.
- You can track disk usage properly because the system stores the Roundcube data within a cPanel user's
- You can locate problematic accounts more easily because the Roundcube PHP processes run as the cPanel user.
- A single point of failure does not exist. Because each user's SQLite database remains separate, database corruptions only impact a single user and not the entire system.
Convert Roundcube to SQLite
To convert the Roundcube database in cPanel & WHM from MySQL to SQLite, run the following command:
After you convert the system to SQLite, you can use this script to troubleshoot issues with specific users.
To convert the Roundcube data for a single cPanel user from MySQL to SQLite, run the same command with the
Migrate Roundcube MySQL database to SQLite database
To migrate a Roundcube database from one cPanel & WHM server to another and convert the data from MySQL to SQLite, perform the following steps:
On the source cPanel & WHM server, create a backup of the Roundcube database. To do this, run the following command:
In this example,
rcubedbrepresents the Roundcube database.
On the destination cPanel & WHM server, create a temporary MySQL database. To do this, follow the directions in our MySQL Databases documentation.
On the destination cPanel & WHM server, open the
/usr/local/cpanel/scripts/convert_roundcube_mysql2sqlitescript and comment out the following lines:
On the destination cPanel & WHM server, import the Roundcube data to the database and convert the data to SQLite. To do this, run the following command on the destination cPanel & WHM server:
The above command contains the following example arguments:
userrepresents the database user.
litedbfromsqlrepresents the database to which to import the Roundcube data.