Seafile upgrade and data migration to the new server

Hi All,

Recently we did migration from Debian 8 to Debian 10 and Seafile upgrade from 6.0.4 → 8.0.6 on the new (test) server, with hope to replace old server with new one.
At the end we decided to sync data one more time from current server (old) to the new one (just replaced data-folder) but not all libraries are seen on the new server.
Apparently we messed up with data-folder and mysql database (inconsistency between files and mysql
db? no head commits?). Is there a way to fix this? Or any suggestions?
Thanks in advance.

Syncing merely the data folder without transferring database dumps won’t update the data you see on your Seafile server. The libraries displayed in the webinterface are stored in the database.

Let’s assume the following course of action:

  • T= 0: You dump Seafile’s databases (seahub_db, seafile_db, ccnet_db) on your old server, you transfer the dumps and your /seafile-data folder from the old to the new server, and you import the dumps on the new server
  • T = 1: You create new libraries on the old server
  • T = 2: Your resync the /seafile-data folder anew

At T = 2, the library and folder structure on your new server will still mirror the situation at T = 0.

Only if you import fresh database dumps in T = 2, then the data structure on the new server will mirror that on the old server.

Hi @rdb
Thanks for your suggestions!
But I think I won’t be able to move db and data between current (old) server and new server since they have different versions (v6 and v8), that would impact seafile’s work.
I’m wondering if I can do something in addition with data so it could match mysql records and files itself

You are right. You cannot.

The upgrade directory in the seafile-server.tar.gz contains a folder “sql” which contains the sql statements executed when upgrading. You can perform these manually to prepare the dump made on your Seafile 6.x for import in Seafile 8.x

I don’t recommend doing that, but you asked.

If I were you, I’d start from scratch: Install Seafile 6.0.4 on Debian 10, sync the data from old to new and import the db dumps, and upgrade from 6.0 to 8.0 on the new server.

If I were you, I’d start from scratch: Install Seafile 6.0.4 on Debian 10, sync the data from old to new and import the db dumps, and upgrade from 6.0 to 8.0 on the new server.

Yeah, I believe that would be the “easiest” way. Thanks!