Help Upgrading Seafile 7.0.5 to 9.0.9

I have an old machine (Deb 8.11/python 3.6) running Seafile Server 7.0.5 and a new machine (Deb 11/Python 3.9) running Server 9.0.9. I am trying to figure out the best way to upgrade the database and transfer files from the old machine/server to the new machine/server. I have already ran an rsync of the seafile-data directory from old machine to new machine. The issue I am running into is updating the 3 databases. I tried running the mysql upgrade files against the databases but kept running into errors.

I would prefer not to touch the old machine, but if necessary, I was thinking as a next step to try to run the upgrade scripts on the old machine running 7.0.5 to step it up to 9.0.9 but am concerned that I am going to run into major python issues as the distro on the old server doesn’t support newer versions of python.

What would you all recommend the best course of action would be to transfer everything over?

How many users and how much data on the old machine?

Are any libraries encrypted on the old machine?

Seven users and about 250 GB.

Yes, some of the libraries are encrypted.


It sounds like you could move the Users and data manually to the new server. Have you thought about that? Obviously the encrypted libraries will need more work and maybe the assistance of the owner(s).

You could use the FUSE extension, for example:

Seaf-fuse is an implementation of the FUSE virtual filesystem. In a word, it mounts all the seafile files to a folder (which is called the ‘’‘mount point’‘’), so that you can access all the files managed by seafile server, just as you access a normal folder on your server.

I did move the data and databases manually to the new server, but it seems that the databases need to be upgraded to match the structure of 9.09, and the upgrade scripts don’t seem to work for that.

What I’m suggesting is a more brute force approach.

Create a user on the new server that exists on the old. Export the user’s data from the old server using FUSE. Login to the new server as the newly created user and upload the exported files (creating libraries as needed). WebDAV might be useful here.

Repeat the process for other users.

Is that approach tractable?

I’m trying to get my head around it. It seems that the encrypted libraries would be challenging.

What do you think about the following alternative approach:

Install Seafile Server 7.0.5 on the new machine, transfer the database and seafile-data in native format from old machine to new machine, then upgrade Seafile Server on the new machine.

Thanks again for your input.

Do you think the owners of the encrypted libraries could remove the encryption so you can export the contents prior to migration?

It would be a lot of work but you could clone the old server to a new drive or box and then progressively upgrade the clone to v.9. Is that more appealing?

Possibly, but I do need to preserve the file history. Does exporting the contents do that?

Debian needs to be upgraded too, so I’d rather start with a fresh Debian installation and migrate the database/data files. Is that approach problematic?

I’m not certain but I suspect that file history is kept in the database. The export process allows you to extract actual files (rather than blocks) from Seafile so they can used elsewhere (like in your migration).

Most likely the database changed as Seafile evolved from v.7 to v.9. Will your v.7 server run on the upgraded Debian box? If so, you could install an up-to-date Debian host, add a clean Seafile v.7 to it, and once that is up and running, migrate your users and data to the new host. After that you could continue to upgrade Seafile to v.9.

Unfortunately, it seems that version 7 is not supported on Debian 11, which is the environment on the new box. So, I’m again wondering if it’s possible to merely upgrade the v.7 database to make it compatible with v9 (copying the v.7 database from the old machine to the new machine running v.9). It seems that this should be possible with the upgrade scripts, but it hasn’t worked for me. Do you have any thoughts on that approach?

I would upgrade incrementally, test each version, and make a backup of each server once it proves to be working. Take a look at this page and see if it makes sense. My personal experience with Seafile is that it is not prudent to jump too far in upgrading.

Do you know the last version of Seafile that is compatible with Debian 8?

Take a look at this post. Another Debian user is upgrading and meeting with success:

For now, I have upgraded from 7.1.7 to 8.0.17 without any specific issue.
I will now see to upgrade Debian (with all proper backups and snapshots), before considering the move to 9.0, which apparently will require more work : elastic search, office file preview through docker or OnlyOffice…

Solved up to Debian 11.5 + Seafile pro 8.0.17.
Will see for upgrade to Seafile 9.0 in some days after learning more about new prerequisites.

I believe v.7 is the last version compatible. That’s why I’m considering copying over the database from v.7. (Debian 8) to the new machine (running Debian 11) and try to only upgrade the database (without updating the entire Seafile server installation). Do you think that’s possible?

I’m not clear on what you mean by this. Can you clarify?

Sure. I plan on taking these steps:

  1. export the relevant databases (seafile-db, seahub and ccnet-db) from Old Machine and copy them along with seafile-data directory to the New Machine(At this point, the New Machine would have server v.9 with databases from server v.7).

  2. On the New Server, run the relevant scripts in upgrade/sql/ to incrementally upgrade the database to v.9.

  1. If necessary, run the relevant scripts in /upgrade/, but I don’t know whether this would be required.

If I’m right, these three steps would provide databases on the New Server that are compatible with v.9.

Seems to me that the Big IF is in Step 1. Have you tried a standard MySQL backup from the old server with a corresponding import (restore) into the new? Is that where you first encountered errors?

I’ve made a lot of progress here, but having trouble with the encrypted libraries, so I started a new topic for this issue.

hi @GLoren,

I have the exact same issue as you had - migrating from 7.0.5 to 9.0.9.
As I have not started the update process yet, I wanted to ask you how you moved on?
Did you manage to update the database from old to new and how?
As you have written in your earlier posts you had some troubles getting the scripts running.

thank you in advance