Upgrade server from 5.1.3 to 6.0.9 issue

Hello, I downloaded the server tar for 6.0.9 and followed the upgrade instructions from

https://manual.seafile.com/deploy/upgrade.html

On running the upgrade script I got the following error:

-------------------------------------------------------------
This script would upgrade your seafile server from 5.1 to 6.0
Press [ENTER] to contiune
-------------------------------------------------------------



Updating seafile/seahub database ...

[ERROR] Error:
 ccnet is using MySQL
 seafile is using SQLite3
 seahub is using SQLite3


 Failed to upgrade your database

I found similar (but not exactly the same error) upgrade issues on the forums and they pointed me to the conf files. According to my ccnet.conf I am using mysql for ccnet.

[Database]
ENGINE = mysql
HOST = 127.0.0.1
PORT = 3306
USER = @@@@@@@
PASSWD = @@@@@@@
DB = ccnet-db
CONNECTION_CHARSET = utf8

I had setup up the seafile server using the instructions at:
https://manual.seafile.com/deploy/using_mysql.html
and used the setup script to create the databases.

The seafiles and seahub conf do not have a [Database] section in them. I think this may be part of problem. Since I used the setup script and instructions aobve I expected ccnet, seafiles and seahub all to use mysql.

Based on this I have a few questions:
Is it a simple issue that the upgrade script assumes sqlite is being used for seahub and seafiles as not alternative is stated in the conf? if I add the database info to the seafile/seahub conf now, is there a risk during the upgrade?

Has seahub and seafiles actually been configured to use sqllite instead of mysql?
If so, can I still upgrade? Do I need to migrate the databases first etc?

This is the first time an upgrade has been performed since the server was setup.

Kind regards,
osheadavid7

It is most likely that the user you run upgrade script doesn’t have the permission to read ccnet.conf and seafile.conf

Hi Daniel,

Thanks for the reply. Both files are owned by the user running the upgrade script. User can read and edit files too. Apologies for delay in replying.

Also I note that in the wiki there is a distinct lack of ‘sudo’ before the upgrade/upgrade_*.sh and therefore I am running the upgrade script as the regular (non-sudo’ed) who set up seafile. Should the script be run with sudo?

There is no need to run the upgrade script with sudo.

For your case, I suggest you to look into the upgrade script (add some debug information) to analyze the exact cause of the problem.