is there any elegant way to move the complete seafile CE server (users, data, configs) to another Computer?
I’ve a raspberryPi running Seafile 9.0.2. But i want to switch from ARM to x86 - so i bought a Lenovo M700 thinkCentre and installed Ubuntu Server.
My main challenge is, i have no idea how to transfer the complete server most elegant with all users and their data to the new server. Kind of clone, but working on a different architecture.
The best case would be if i can directly switch to seafile docker on ubuntu.
Before i started the server i just overwrote the MariaDBs of the new server with the dbs of the productiv server (ccnet_server, seafile_server, seahub_server)
I copied the seahub_data and seafile_data folder (300GB)
Seafile Service starts. Seahub directly fails. The Seahub .log file is empty.
If i start it manually it says:
LC_ALL is not set in ENV, set to en_US.UTF-8
./seahub.sh: line 220: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
Starting seahub at port 8000 ...
Seahub is started
Done.
But it is not up. If i try to open the http://myserver:80 site it says: Not found
Side note: The new server has seafile 9.0.4 x86, the productive server 9.0.2 ARM version. Maybe i shoud try 9.0.2 x86 and update later?
Edit: I tried it with Seafile 9.0.2 x86. Same result.
I already found a few threads with the same problem. What i have checked:
open on host 0.0.0.0:8000 (seahub port) - The Page appears correctly. Login works too. But if i open the user settings the site shows “server hiccup”. Adminstrator Settings are working. Strange…
Refreshing user permission for the seafile home folder with
sudo chown -R seafile:seafile seafile
→ no effect
Something is really broken but i have no clue what the issue is?
Dump Seafile MariaDBs (creating backup of MariaDBs: ccnet-db, seafile-db, seahub-db): I used this tutorial: How to dump & restore a MariaDB/MySQL database from a docker container
Placed the dumps to the mysql shared path of the seafile-mysql container. I used the default folder /opt/container/seafile-mysql/db and created a temp subdir with mkdir _backup where i’ve placed my dumps.
Logged with portainer (console) into the seafile-mysql container
Restore the DBs (path of my _backup folder where the dumps are: /var/lib/mysql/_backup) with the restore command (tutorial above).
Following DBs are affected: ccnet-db, seafile-db, seahub-db
Restore seafile-data and seahub-data: Go to your default container volume path (mine: /opt/container/seafile/seafile-data/seafile). Delete seafile-data and seahub-data. Transfer your seafile-data and seahub-data from productiv system to this path. Set root as owner of both folders: sudo chown -R root:root seafile-data sudo chown -R root:root seahub-data
(re)Start your docker stack
open web interface and login
I still had problems with pdf Preview and file upload. Also my profile picture was broken. I checked System-Administration → SERVICE_URL and FILE_SERVER_ROOT. I’ve set a different port in docker for seafile. So I changed it to: SERVICE_URL -> http://adressOrIpOfTheServer:Port/ FILE_SERVER_ROOT -> http://adressOrIpOfTheServer:Port/seafhttp
That’s it i think. Maybe i could helpout someone in the future with this hints.