{"id":683,"date":"2021-07-23T12:35:34","date_gmt":"2021-07-23T12:35:34","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/guide-to-horde-data-behavior\/"},"modified":"2021-07-23T12:35:34","modified_gmt":"2021-07-23T12:35:34","slug":"guide-to-horde-data-behavior","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/guide-to-horde-data-behavior\/","title":{"rendered":"Guide to Horde Data Behavior"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\"><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<p>cPanel &#038; WHM\u2019s Horde user data storage uses individual SQLite databases for each cPanel account. Horde webmail and CalDAV\/CardDAV services execute as the cPanel account user. This document explains the methods that the system uses to manage Horde data.<\/p>\n<h3 id=\"new-installations\">New installations<\/h3>\n<p>The system stores Horde user data into the new location from the installation.<\/p>\n<h2 id=\"horde-components-and-table-schemas\">Horde components and table schemas<\/h2>\n<p>Horde user data storage uses many components which include, but are not limited to, the following modules:<\/p>\n<ul>\n<li>Horde Application Framework<\/li>\n<li>IMP (Mail)<\/li>\n<li>Ingo (Mail Filters)<\/li>\n<li>Kronolith (Calendar)<\/li>\n<li>Mnemo (Notes and Memos)<\/li>\n<li>Nag (Task List)<\/li>\n<li>Trean (Bookmark Manager)<\/li>\n<li>Turba (Address Book).<\/li>\n<\/ul>\n<h2 id=\"scripts\">Scripts<\/h2>\n<h3 id=\"the-update-horde-config-script\">The update_horde_config script<\/h3>\n<p>The <code>\/usr\/local\/cpanel\/bin\/update_horde_config<\/code> script:<\/p>\n<ul>\n<li>Does <strong>not<\/strong> add database credentials to <code>\/usr\/local\/cpanel\/base\/horde\/config\/conf.php<\/code> file. The SQLite database uses filesystem permissions for access control.<\/li>\n<li>Handles the initial creation of cPanel account SQLite database for Horde.<\/li>\n<li>Performs schema checks and upgrade operations with the <code>--full<\/code> option.<\/li>\n<\/ul>\n<p>For more information, run the <code>\/usr\/local\/cpanel\/bin\/update_horde_config --help<\/code> command.<\/p>\n<h2 id=\"the-sqlite-horde-database-and-the-cphorde-directory\">The SQLite Horde database and the cphorde directory<\/h2>\n<p>Each cPanel account possesses its own <code>.cphorde<\/code> directory under the account\u2019s home directory. The <code>.cphorde<\/code> directory contains the following items:<\/p>\n<ul>\n<li><code>horde.sqlite<\/code> (SQLite database) \u2014 This database contains the cPanel account\u2019s Horde data.<\/li>\n<li><code>meta<\/code> (Directory) \u2014 The backup service uses this directory to create the Horde database backups.<\/li>\n<li><code>vfsroot<\/code> (Directory) \u2014 The <code>\/usr\/local\/cpanel\/base\/horde\/config\/conf.php<\/code> file uses this directory for the <code>vfsroot<\/code> setting.<\/li>\n<\/ul>\n<h2 id=\"the-conf-php-file\">The conf.php file<\/h2>\n<div class=\"callout callout-warning\">\n<div class=\"callout-heading\">Important:<\/div>\n<div class=\"callout-content\">\n<p>cPanel account users <strong>must<\/strong> have permissions to this file.<\/p>\n<\/p><\/div>\n<\/div>\n<p>The following applies to the <code>\/usr\/local\/cpanel\/base\/horde\/config\/conf.php<\/code> file:<\/p>\n<ul>\n<li>This file does <strong>not<\/strong> contain Horde database credentials or a server-specific MySQL\u00ae password. The <code>sql<\/code> entries in this file only contain the generic SQLite setup configuration.<\/li>\n<li>This file\u2019s permission is world-readable.<\/li>\n<\/ul>\n<h2 id=\"horde-database-troubleshooting-and-repair\">Horde database troubleshooting and repair<\/h2>\n<p>You can use the following section to troubleshoot problems for each cPanel account\u2019s Horde SQLite database.<\/p>\n<div class=\"callout callout-danger\">\n<div class=\"callout-heading\">Warning:<\/div>\n<div class=\"callout-content\">\n<p>If you delete a cPanel account\u2019s Horde SQLite database, you will lose <strong>all<\/strong> of that account\u2019s calendar and contact information.<\/p>\n<\/p><\/div>\n<\/div>\n<h4 id=\"reset-horde-database-password\">Reset horde database password.<\/h4>\n<p>You cannot perform this action. The SQLite database relies on filesystem permissions for access control, not a password.<\/p>\n<h4 id=\"create-a-missing-database-for-cpanel-user\">Create a missing database for cPanel user<\/h4>\n<p>Use the following script, where <code>USERNAME<\/code> is the cPanel account\u2019s username:<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-BASH\" data-lang=\"BASH\">\/usr\/local\/cpanel\/bin\/update_horde_config --user<span style=\"color:#f92672\">=<\/span>USERNAME<\/code><\/pre>\n<\/div>\n<h4 id=\"create-missing-databases-for-all-cpanel-users-on-the-system\">Create missing databases for all cPanel users on the system<\/h4>\n<p>Use the <code>\/usr\/local\/cpanel\/bin\/update_horde_config<\/code> script.<\/p>\n<h4 id=\"upgrade-tables-or-create-missing-tables-in-an-existing-database-for-a-cpanel-user\">Upgrade tables or create missing tables in an existing database for a cPanel user<\/h4>\n<p>Use the <code>\/usr\/local\/cpanel\/bin\/update_horde_config<\/code> script with the <code>--full<\/code> option, where <code>USERNAME<\/code> is the cPanel account\u2019s username:<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-BASH\" data-lang=\"BASH\">\/usr\/local\/cpanel\/bin\/update_horde_config --user<span style=\"color:#f92672\">=<\/span>USERNAME --full<\/code><\/pre>\n<\/div>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>The <code>--full<\/code> option instructs the script to perform the full table schema check and upgrade\/repair instead of <strong>only<\/strong> checking whether the database exists.<\/p>\n<\/p><\/div>\n<\/div>\n<h4 id=\"upgrade-tables-or-create-missing-tables-in-the-existing-databases-for-all-users-on-the-system\">Upgrade tables or create missing tables in the existing databases for all users on the system<\/h4>\n<p>Run the following script:<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-BASH\" data-lang=\"BASH\">\/usr\/local\/cpanel\/bin\/update_horde_config --full<\/code><\/pre>\n<\/div>\n<div class=\"callout callout-danger\">\n<div class=\"callout-heading\">Warning:<\/div>\n<div class=\"callout-content\">\n<p>This script may require significant time to execute on systems with many accounts.<\/p>\n<\/p><\/div>\n<\/div>\n<h4 id=\"move-and-re-create-a-new-horde-database-for-a-cpanel-user-with-the-default-calendars-and-address-books\">Move and re-create a new horde database for a cPanel user with the default calendars and address books<\/h4>\n<ol>\n<li>Move the user\u2019s file, where <code>USERNAME<\/code> is the cPanel account\u2019s username:\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-BASH\" data-lang=\"BASH\">mv ~USERNAME\/.cphorde\/horde.sqlite ~USERNAME\/.cphorde\/horde.sqlite.bak<\/code><\/pre>\n<\/div>\n<\/li>\n<li>Run the following script:\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-BASH\" data-lang=\"BASH\">\/usr\/local\/cpanel\/bin\/update_horde_config --user<span style=\"color:#f92672\">=<\/span>USERNAME --create-defaults<\/code><\/pre>\n<\/div>\n<\/li>\n<\/ol><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview cPanel &#038; WHM\u2019s Horde user data storage uses individual SQLite databases for each cPanel account. Horde webmail and CalDAV\/CardDAV services execute as the cPanel account user. This document explains the methods that the system uses to manage Horde data. New installations The system stores Horde user data into the new location from the installation. &hellip;<\/p>\n","protected":false},"author":1,"featured_media":684,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/683"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=683"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/683\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/684"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}