Hi all,
I’m trying, for test purpose at this time, to migrate an old Seafile 6.3 (centos 7) to a Seafile 11 installed on a new server Debian 12. Transfering datas and databases is ok.
Now I try to launch upgrade_6.3_7.0.sh to begin db upgrade, but it stops with
“Can’t find a python executable of version 2.7 or above in PATH
Install python 2.7+ before continue.
Or if you installed it in a non-standard PATH, set the PYTHON enviroment variable to it”
Sure, Debian 12 comes with python 3.7.
I know I can try to execute manually sql statements from sql/ directory. But the upgrade scripts do not just upgrade sql, they make other updates ? For example, in 6.3 to 7.0 seahub.sql it alter tables “TotalStorageStat” and “UserActivityStat” that not exists in seahub-db. Where and when this tables are created ? In 7.1 to 8.0 script, we have a “seafevents.sql” which alter a table “VirusFile” not existing in any *-db.
So : I’lm not sure that just executing sql statements is enough ?
What is your opinion about this ?
Thanks !
Upgrading a very old Seafile instance to the latest version directly on the old instance machine is hard. So we suggest you follow backup and recovery process, i.e., running a new Seafile instance with newest version and migrate the data from the old instance. The related document is Backup and Recovery - Seafile Admin Manual
Our suggestion steps steps are below:
Deploy a new Seafile instance with Docker in a new machine
Stop the new Seafile instance and clean its database (MySQL/MariaDB data)
Backup and restore database and seafile data from old server to the new server
Now the database tables in the new instance are for the old version. You need to run the upgrade scripts to update the database tables to be compatible with the newest version. (Or you can run the SQL statements manually, the files are under seafile-server-latest/upgrade/sql)
Restart the new Seafile instance, and check the logs to see if there are any database related errors. If so, fix them manually.
Yes, it’s exactly what I’ve done regarding the doc, see first message. The problem is that the first upgrade script (6.3 to 7.0) claims about Python 2.7
I don’t think python2.7 is available in debian 12’s main repository. You might be able to download the python 2.7 package from debian 11 (old-stable) and install it long enough to do the upgrade.
If that doesn’t work, you might be able to install debian 11 in a container or VM to run the script with.