Migrate from local install to Docker

I recently needed to re-install my OS (Ubuntu server) but I still have a copy of all the data. I had Seafile 6.3.4 installed (not using Docker).

I wanted to get the latest Seafile and saw that Docker is recommended. I’d like to try that.

What should I do to get my old data to the new install? Is there a “how-to” for this scenario?

Well, the container didn’t work and I didn’t see a way to debug it.

I went back to the local installation and saw that I had a lot of upgrading to do. It was a pain because v6->v7 needed Python2 and that has spotty support in Ubuntu 20.04/Focal. I had to keep trying and failing until I got the right Python bits installed.

I also hadn’t touched the config files in ages and I had to change the password in three files.

When it worked, I got a few warnings because I had run it more than once.

[WARNING] Failed to execute sql: (1060, u"Duplicate column name ‘is_manual_set’")

And then there were other warnings:

[WARNING] Failed to execute sql: (1146, u"Table ‘seahub-db.TotalStorageStat’ doesn’t exist")
[WARNING] Failed to execute sql: (1146, u"Table ‘seahub-db.FileOpsStat’ doesn’t exist")
[WARNING] Failed to execute sql: (1146, u"Table ‘seahub-db.UserActivityStat’ doesn’t exist")
[WARNING] Failed to execute sql: (1051, u"Unknown table ‘seahub-db.UserTrafficStat’“)
[WARNING] Failed to execute sql: (1091, u"Can’t DROP INDEX profile_profile_contact_email_0975e4bf_uniq; check that it exists”)

v7.0->v7.1 had one warning:

[WARNING] Failed to execute sql: (1091, “Can’t DROP INDEX drafts_draft_origin_file_uuid_7c003c98_uniq; check that it exists”)

Of course, I needed Python3 to go from v7->v8. But there weren’t any errors or warnings, when that upgrade ran.


  1. Should I care about any of those warnings? I looked through things and so far, the installation seems to be working.

  2. Now that the database has been migrated and things are working, I could probably get the Docker version to work, right?

  3. Can I delete Python2? I only see Python3 being used.

For migration use exactly the same version of seafile and mysql.
After done, you can upgrade both. Don’t forget to run mysql_upgrade in container after change the mysql/mariadb version.

First of all, try to install a new clean seafile in docker, and after you see how it works, and how store the data, simply can replace the data folder and import the old database.