cPanel Horde Data Conversion from MySQL to SQLite
The horde_mysqltosqlite script in cPanel is used to switch and convert Horde consumer knowledge from a single shared MySQL database to one-per-cPanel-user SQLite databases. This script runs if you improve your cPanel & WHM Model from 11.48 to 11.50. If the system experiences any subject in the course of the conversion course of, it sends a notification to the consumer, saying that “You added in WHM’s Primary Webhost Supervisor Setup interface”. You may entry the above Setup by following these steps:
- Log in to WHM as a root consumer.
- Navigate to the ‘Server Configuration’ part.
- Choose the ‘Primary WebHost Supervisor’ Setup.
The horde_mysqltosqlite script runs the Horde database conversion within the following order:
- Firstly, the script creates a backup of the Horde MySQL database. If the backup exists, then it’s skipped. At all times be certain that to retain this backup till you confirm that the script efficiently transformed the Horde consumer knowledge.
- The script then checks for any Horde MySQL database schema issues and repairs it.
- Then the script converts the Horde MySQL single shared database to one-per-cPanel-user SQLite databases.
- After the profitable conversion of the database, the script removes the Horde MySQL database.
The basis consumer can solely execute the horde_mysqltosqlite script, they usually can use the next codecs for the specified actions.
1) Convert All of the Customers
Log in to your server as root consumer and run the under command to transform all of the horde customers from the MySQL database to the SQLite database.
$ /usr/native/cpanel/scripts/horde_mysqltosqlite
2) Convert a Single Consumer
Run the under command as root consumer out of your server to transform a single consumer from the MySQL database to the SQLite database.
$ /usr/native/cpanel/scripts/horde_mysqltosqlite –consumer [user]
3) Convert A number of Customers
If you wish to convert a number of customers from MySQL database to SQLite database, then you may run the under command. You may point out a number of consumer IDs with house in between them in order that this command converts the talked about consumer’s knowledge from MySQL to SQLite.
$ /usr/native/cpanel/scripts/horde_mysqltosqlite --user [user1] [user2] [user3]
A few of the exhaustive argument used together with the horde_mysqltosqlite script is the next:
Choice | Description |
–consumer | To specify the customers to transform. |
–force-backup | To overwrite the MySQL database backup if it exists. |
–no-backup | To skip the MySQL database backup throughout conversion |
–no-convert | Run the script with out the conversion course of. |
–no-fix-schema | To skip the MySQL database schema restore operate |
–no-drop | To skip the MySQL database elimination |
–force-drop | Forcefully take away the MySQL database. Solely use this flag after you exchange all Horde consumer knowledge. |
–replace-dest-db | Choice to maneuver the present SQLite database and create a brand new one. |
–verbose | To generate extra output particulars |
The SQLite Horde Database and The ~/.cphorde Listing
In cPanel and WHM model 11.50 and later, below the accounts residence listing, every cPanel account acquires its personal .cphorde listing. The .cphore listing contains the next gadgets:
Title | Sort | Description |
Horde.sqlite | SQLite database | This database comprises the Horde knowledge for all of the cPanel accounts. |
meta | Listing | This listing is utilized by the backup companies to create the Horde database backups. |
vfsroot | Listing | The /usr/native/cpanel/base/horde/config/conf.php file makes use of this listing for the vfsroot setting. |
Troubleshoot Horde Knowledge Conversion from MySQL to SQLite
The usual-issue occurred in the course of the Horde knowledge conversion from MySQL to SQLite are:
Horde Database Backup Already Exists
Whereas changing the Horde knowledge from MySQL to SQLite, the system throws an error saying that the Horde database backup already exists. The entry of the identical is made within the logs as proven within the under snippet:
We are able to resolve this downside by checking the integrity of the backup. You may observe the under step for a similar.
1) Verify if the present backup is legitimate by operating the next command, or you may manually verify the identical from “/var/cpanel/horde/horde.backup.sql.last” file.
$ awk ‘/cPanel dump:/d++ENDprintf(“%s bavkupn”,d==2?"good":"unhealthy”)’ /var/cpanel/horde/horde.backup.sql.last
2) After validation, you may run the horde_mysqltosqlite script with the no backup choice.
$ /usr/native/cpanel/scripts/horde_mysqltosqlite --no-backup
3) If you would like a recent backup and don’t wish to use the present one. Then you may transfer the backup file after which run the “/usr/native/cpanel/scripts/horde_mysqltosqlite” script. You may transfer the present backup utilizing the under command.
$ mv -v /var/cpanel/hore/horde.backup.sql.last,.bakdate +%s
MySQL Horde Database Schema Fixer Failed
Whereas changing the Horde database, there’s a step to repair all of the MySQL Horde database schema points. If the Horde schema fixer step fails then you may see the under entry within the log:
BEGIN ERROR: Failed the following assertion with error:
In the event you obtain this error within the log, then the conversion script just isn’t in a position to confirm and restore the schema of the MySQL Horde database.
If you wish to full the conversion course of with out the schema restore, then you may run the horde_mysqltosqlite script with the no schema repair choice.
$ /usr/native/cpanel/scripts/horde_mysqltosqlite --no-fix-schema
Horde SQLite Database Troubleshooting
In the event you delete a cPanel account’s Horde SQLite database, then you definitely lose the entire account’s calendar and get in touch with info. A few of the widespread issues in Horde SQLite database are:
1) Reset the Horde Database Password
The SQLite database depends on filesystem permissions and never a password for entry management. So, this motion can’t be carried out.
2) Create a Lacking Database for a cPanel Consumer
If you wish to create a lacking database for a cPanel consumer, then you may run the under command:
# /usr/native/cpanel/bin/update_horde_config --user=<username>
If you wish to create or replace the tables within the lacking listing then you’ll want to run the under command:
# /usr/native/cpanel/bin/update_horde_config --user=<username> --full
3) Creating Lacking Database for All cPanel Customers on the System
If you wish to create a lacking database for all cPanel consumer, then you may run the under command:
# /usr/native/cpanel/bin/update_horde_config
If you wish to create or replace the tables within the lacking listing then you’ll want to run the under command:
# /usr/native/cpanel/bin/update_horde_config --full
So, that is how one can convert MySQL to SQLite in Horde. You probably have any questions concerning this tutorial or the method, please tell us within the remark part given under.