Seafile Server Migration - from Windows Docker Desktop to Ubuntu 22.04 Docker Engine

It tooks me quite a while and it turned out much easier. My plan was to convert Seafile Server running on Windows Docker Desktop to windows HyperV VM, so it is much easier to backup, expand the size etc…

Below is how:

1: on Destination Ubuntu 22.04(in my case is VM), install the docker engine, and then install a new seafile container by using the same docker-compose.yml file that you used to create your current seafile container. (Haven’t tried with by using latest docker-compose.yml)

2.shudown above new created seafile container(all container) in Ubuntu 22.04
$docker stop $(docker ps -a -p)

  1. shutdown all seafile container on Windows-Docker-Desktop

  2. in Windows-Docker-desktop, Locate following 2 folders in ./opt/, seafile-data, seafile-mysql, that contain all the seafile library and login
    image

  3. on Ubuntu22.04, locate following 2 folders in ./opt/, seafile-data, seafile-mysql, and rename them each to seafile-data-bak, seafile-mysql-bak

  4. copy seafile-data folder and seafile-mysql folder from Windows-Docker-desktop to Ubuntu22.04, in my case, I copied them over to a folder on Ubuntu22.04 first, then on Ubuntu22.04, copy them again over to the ./opt folder
    scp -r seafile-mysql username@Ubuntu22.04:/home/username/Documents/Docker/Seafile/seafile-mysql

scp -r seafille-data username@Ubuntu22.04:/home/username/Documents/Docker/Seafile/seafile-data

6.1 copy them again on ubuntu22.04 to the ./opt folder
sudo cp -r seafile-mysql /opt/seafile-mysql
sudo cp -r seafile-data /opt/seafile-data

  1. start your new seafile container on Ubuntu22.04
    docker start $(docker ps -a -q)

  2. that is it, all done!

Note: Seafile’s officical site has document on backup and restore, I found they are outdated, it simply did not work for me.