1

Topic: Roundcube 1.4.10 upgrade fails: table 'filestore' already exists

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2
- Deployed with iRedMail Easy or the downloadable installer? DL
- Linux/BSD distribution name and version: Debian 10.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL (MariaDB)
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Debian issued a security notice for roundcubemail. In iRedMail I think it's installed separately and not as a Debian pkg, at least that's how it was set up on my system.

Ran the upgrade using this command from the 1.4.10 directory. I think the target is 1.4.4 because that's what was first installed when I set up the system:

bin/installto.sh /opt/www/roundcubemail-1.4.4/

The upgrade went fine until returning this error:

Running update script at target...
Executing database schema update.
ERROR: Error in DDL upgrade 2018021600: [1050] Table 'filestore' already exists
Updating database schema (2018021600)... [FAILED]

A web search didn't find anything about this specific error. I have seen other posts about mismatched schema versions but I don't know how to correct this.

Thanks in advance for clues on getting the upgrade to run cleanly.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Roundcube 1.4.10 upgrade fails: table 'filestore' already exists

Try to load missed SQL files manually like this:

# cd roundcubemail-1.4.10/SQL/mysql/
# mysql roundcubemail
mysql> SOURCE 2018122300.sql;
mysql> SOURCE 2019092900.sql;

It will skip errors and finish other changes.

3

Re: Roundcube 1.4.10 upgrade fails: table 'filestore' already exists

ZhangHuangbin wrote:
mysql> SOURCE 2018122300.sql;
mysql> SOURCE 2019092900.sql;

It will skip errors and finish other changes.

Thanks. The first command returned a duplicate-column error:

MariaDB [roundcubemail]> SOURCE 2018122300.sql;
ERROR 1060 (42S21) at line 1 in file: '2018122300.sql': Duplicate column name 'context'
Query OK, 0 rows affected (0.000 sec)
Rows matched: 0  Changed: 0  Warnings: 0

Query OK, 0 rows affected (0.101 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.070 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.046 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.103 sec)
Records: 0  Duplicates: 0  Warnings: 0

The second command ran clean.

However, the upgrade still returns the same 'Table 'filestore' already exists' error.

Roundcube has run on this system a long time. Although I've tried to carefully follow all the upgrade instructions, it's possible I missed an upgrade, or that something went wrong when converting from a FreeBSD to a Debian platform.

What else can I do to get the database upgrade to run clean? Thanks again.

4

Re: Roundcube 1.4.10 upgrade fails: table 'filestore' already exists

cvcvelo wrote:

What else can I do to get the database upgrade to run clean? Thanks again.

Running "source xxx.sql;" to import those 2 sql files already upgraded the database. it's good to go.

5

Re: Roundcube 1.4.10 upgrade fails: table 'filestore' already exists

This same error message persists when upgrading to Roundcubemail 1.4.11:

MariaDB [roundcubemail]> SOURCE 2018122300.sql;
ERROR 1060 (42S21) at line 1 in file: '2018122300.sql': Duplicate column name 'context'
Query OK, 0 rows affected (0.000 sec)
Rows matched: 0  Changed: 0  Warnings: 0

Roundcube seems to work OK after the upgrade, same as the upgrade to 1.4.10. Not sure why the duplicate error persists, though.

6

Re: Roundcube 1.4.10 upgrade fails: table 'filestore' already exists

Don't forget to update value in "roundcubemail.system" table, set the value to the latest sql structure version (the file name of the newest file under "SQL/mysql/" directory). e.g. 2019092900.

mysql> select * from system;
+-------------------+------------+
| name              | value      |
+-------------------+------------+
| roundcube-version | 2019092900 |
+-------------------+------------+

Note: this should be updated by Roundcube installer automatically, but if it didn't, or you updated sql structure manually and this was not updated, then do it.