Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
stylenone

Overview

If your Roundcube database fails to restart or becomes corrupt, you can rebuild the Roundcube database to repair it. This document explains how to rebuild a Roundcube database in cPanel & WHM version 60 and earlier.

Warning
titleWarning:

cPanel, Inc. deprecated the update-roundcube and update-roundcube-sqlite scripts in cPanel & WHM version 62.

Path and filename for the database

The SQLite database uses the following path and filename, where username represents a cPanel account username and domain represents a domain name:

Code Block
languagebash
/home/username/etc/domain/username.rcube.db

Additionally, the database applies the following naming conventions, where username represents a cPanel account username:

FilenameDescriptionExample
/home/username/etc/domain/username.rcube.db
A backup file with a Unix timestamp.username.rcube.db.1495814375
/home/username/etc/domain/username.rcube.db
A symlink to the latest Roundcube backup.username.rcube.db.latest
/home/username/etc/domain/username.rcube.db
An SQLite v2 backup file.username.rcube.db.20170523105040.sqlite2

Rebuild a Roundcube database

To update a Roundcube database, run one of the following commands:

Code Block
languagebash
linenumberstrue
/usr/local/cpanel/bin/update-roundcube-db --force
/usr/local/cpanel/bin/update-roundcube-sqlite-db --force


Note
titleNote:

The /usr/local/cpanel/bin/update-roundcube-db script will update your database whether you use MySQL® or SQLite. The script recognizes whether you use SQLite and automatically runs the /usr/local/cpanel/bin/update-roundcube-sqlite-db script.

MySQL database

Use the /usr/local/cpanel/bin/update-roundcube-db script to rebuild a Roundcube MySQL database.

To rebuild a Roundcube database, run the following command:

Code Block
languagebash
/usr/local/cpanel/bin/update-roundcube-db --force


If the script succeeds, you will receive a message that resembles the following example:

Code Block
languagebash
linenumberstrue
info [update-roundcube-db] Roundcube update from 1.1.4-7.cp1162 to 1.1.4-7.cp1162 in progress.
info [update-roundcube-db] Roundcube will be locked out during this process.
info [update-roundcube-db] Archiving current Roundcube data to /var/cpanel/roundcube/roundcube.backup.sql.1479139688
info [update-roundcube-db] Roundcube DB successfully archived
info [update-roundcube-db] Cleaning old Roundcube data archives
info [update-roundcube-db] Removing old backup: roundcube.backup.sql.1467293128
info [update-roundcube-db] Schema update to 1.1.4-7.cp1162 was successful
info [update-roundcube-db] Roundcube updated to 1.1.4-7.cp1162

SQLite database

Use the /usr/local/cpanel/bin/update-roundcube-sqlite-db script to rebuild a Roundcube SQLite database.

To rebuild a Roundcube database, run the following command:

Code Block
languagebash
/usr/local/cpanel/bin/update-roundcube-sqlite-db --force


If the script succeeds, you will receive a message that resembles following example:

Code Block
languagebash
linenumberstrue
info [update-roundcube-db] Roundcube update from 1.1.4-7.cp1162 to 1.1.4-7.cp1162 in progress.
info [update-roundcube-db] Roundcube will be locked out during this process.
info [update-roundcube-db] Archiving current Roundcube data to /var/cpanel/roundcube/roundcube.backup.sql.1479139822
info [update-roundcube-db] Roundcube DB successfully archived
info [update-roundcube-db] Cleaning old Roundcube data archives
info [update-roundcube-db] Removing old backup: roundcube.backup.sql.1469194482
info [update-roundcube-db] Schema update to 1.1.4-7.cp1162 was successful
info [update-roundcube-db] Roundcube updated to 1.1.4-7.cp1162

 

Additional documentation

Localtab Group


Localtab
activetrue
titleSuggested documentation

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("roundcube","webmail") and label = "whm" and space = currentSpace()


Localtab
titleFor cPanel users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("roundcube","webmail") and label = "cpanel" and space in (currentSpace(),"DOC")


Localtab
titleFor WHM users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("roundcube","webmail") and label = "whm" and space in ("ALD","CKB")


Localtab
titleFor developers

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("roundcube","webmail") and space = "DD"