Full transfer Seafile CE Server (ARM RaspberryPi) to Ubuntu Server (x86)

Hi,

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.

Are there any good tutorials? :slight_smile:

Well my first attempt failed:

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.

Any advice?

So I figured out what the problem is:

Portainer / Docker is using port 8000. But seahub does not log any error.
I found this:

conf/gunicorn.conf.py and change daemon = True to daemon = False

Start seahub again with

./seahub.sh start

after that i got the error, that port 8000 is already in use. I will fix this and will reply if the migration finally worked.

Update:

Seahub and Seafile starts. But if i open the website the page looks broken:

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?

Finally got it working. As follows, my steps if someone step over my topic:

  • Install Seafile with Docker. I use portainer and this tutorial:
    https://www.diytechguru.com/2021/04/28/install-seafile-on-docker/
    It works out of the box.

  • 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.