I recently migrated my Seafile instance from one server to another:
rsync the Seafile Data folder to the new server
dump mysql db (ccnet_db, seafile_db, seahub_db) and restored to the new server
Differences in the new server vs the old server:
New server uses HTTPS and the old one didn’t
New server is in Docker but old one wasn’t
The web interface starts up fine, and login was okay. I could see the list of all the libraries correctly, as well as see all the users when in admin mode.
However, when I click onto a library, it says “Library share permission not found.” and prompts my user to “Leave Share”. Access is ok when creating new libraries.
There are tons of libraries and important data that is migrated to the new server.
Digging into the source code reveals that a 404 error is thrown by the API: seahub /frontend/src/pages/lib-content-view/lib-content-view.js#L173
Not sure which part of the migration I’ve done wrong/incomplete. Has anyone had any similar experience? Would really really appreciate some pointers.
I realised that in previous version of Seafile, the directory structure of where the “storage” folder is placed is different in the new version. Either this is because of version difference, or because my previous instance wasn’t in docker but the new one is.
When I compared with a fresh installation, the directories
- storage
– blocks
– commits
– fs
were in a different location.
I therefore made sure the old “storage” directory syncs up properly with the new instance’s structure, and my libraries became accessible.
Another thing to note as well is that I had to go into System Admin (in UI) and change FILE_SERVER_ROOT to https://<my.domain.here>/seafhttp instead of the old http://<my.domain.here>:8082. If this wasn’t changed, binary files cannot be downloaded or uploaded. Interestingly, text files could.
FYI I had this problem as well, after migrating/restoring from a backup. It happened only on the first run when the data & DB tables were put back in place, and resolved itself after restarting the server & database server.