Tip : if upgrading from old roundcube fails

What app is this about, and its version: roundcube v1.4.11~ynh2
What YunoHost version are you running: 11.3
What type of hardware are you using: Old laptop or computer

Describe your issue

I failed to upgrade roundcube app from v1.4.11~ynh2 to 1.6.11~ynh1.

I did not dug too far. IMHO the gap (~6 years !) between versions of the ynh pkg is too wide to expect update to go smoothly.

However I wanted to share how I did the upgrade manually keeping all user data (important part being addressbooks).

backup your data/apps first !!

Then…

  1. Log out your user from roundcube (more important than it seems)
  2. Get a database dump from the old roundcube
    mysqldump roundcube > /root/roundcube_1.4_dump.sql
  3. Uninstall old roundcube app
  4. Install roundcube from scratch (DO NOT LOGIN NOW)
  5. Import dump from old roundcube and update database schema with the following script :
export rc_app=roundcube
export backup_file=/root/roundcube_1.4_dump.sql

mysql $rc_app < $backup_file
echo 'drop table collected_addresses;' | mysql $rc_app
echo 'drop table responses;' | mysql $rc_app
su roundcube__3 -c "cd /var/www/$rc_app ; php8.3 ./bin/updatedb.sh --dir SQL/ --package roundcube"

Log in, enjoy.

From what I tested, all user settings were kept, and the default roundcube plugins provided by yunohost package were restored nicely and still working.

Share relevant logs or error messages

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.