Replace old Seafile server in Docker

Guys, I have to make the impossible possible.
I don’t have much Linux knowledge and the colleague who was actually responsible is gone.

We have a relatively old Seafile server that no longer boots up properly when you restart it. Seafile is installed there without Docker.

The plan was to set up a new Seafile server with Docker and import the data from the old server into the new one. (Good 3 TB)

Fortunately, the new Seafile server is already up and running, now the next step is the migration, which I have to take over.

Old server:
Debian 11
nginx/1.18.0
Seafile 10.0.9 (probably)

New server:
Ubuntu 22.04.4 LTS
Seafile latest

I have nothing but coffee, ChatGPT, Linux basics and the post “Migrate from non-docker Seafile deployment to docker”

This is how I would proceed:
Docker Seafile to 10.0.9 so that the version is the same.
(Remember, I can’t reboot the old one, it probably won’t start.)

Kill all the services:
systemctl stop nginx && systemctl disable nginx
systemctl stop memcached && systemctl disable memcached
./seafile.sh stop && ./seahub.sh stop

Copy the DB to the new server from
/opt/seafile/conf and /opt/seafile/seahub-data
(probably chmod 777 once because otherwise it won’t work?

to /opt/seafile-data/seafile on the new server.

Then boot up the server
cd /opt/seafile-data
docker compose up -d

Then there are these strange security precautions:
iptables -A INPUT -s 172.16.0.0/12 -j ACCEPT #Allow Dockernetworks
iptables -A INPUT -p tcp -m tcp --dport 3306 -j DROP #Deny Internet
ip6tables -A INPUT -p tcp -m tcp --dport 3306 -j DROP #Deny Internet

Thats it… I guess?
Does that work so far, are there any objections?
Many thanks for any feedback!

Have you checked this guide below? I believed it can cater your migration need:
https://manual.seafile.com/maintain/backup_recovery/

Hi, the documentation says that I need to backup and restore the data directory and database.

Is this also the case if I move the data from a native installation to a Docker-based installation?

The /opt/seafile data directory folder of the native installation must be incompatible with the Docker installation, right?
So is it sufficient to restore the mysql database files?
Or do the database need some kind of file of the /opt/seafile directory, to combine the data of the multiple databases to a single user?

Like this:
Old Server:

mysqldump -h [mysqlhost] -u[username] -p[password] --opt ccnet_db > /backup/databases/ccnet-db.sql.`date +"%Y-%m-%d-%H-%M-%S"`
mysqldump -h [mysqlhost] -u[username] -p[password] --opt seafile_db > /backup/databases/seafile-db.sql.`date +"%Y-%m-%d-%H-%M-%S"`
mysqldump -h [mysqlhost] -u[username] -p[password] --opt seahub_db > /backup/databases/seahub-db.sql.`date +"%Y-%m-%d-%H-%M-%S"`

New Server:

docker cp /backup/databases/ccnet_db.sql seafile-mysql:/tmp/ccnet_db.sql
docker cp /backup/databases/seafile_db.sql seafile-mysql:/tmp/seafile_db.sql
docker cp /backup/databases/seahub_db.sql seafile-mysql:/tmp/seahub_db.sql

docker exec -it seafile-mysql /bin/sh -c "mysql -u[username] -p[password] ccnet_db < /tmp/ccnet_db.sql"
docker exec -it seafile-mysql /bin/sh -c "mysql -u[username] -p[password] seafile_db < /tmp/seafile_db.sql"
docker exec -it seafile-mysql /bin/sh -c "mysql -u[username] -p[password] seahub_db < /tmp/seahub_db.sql"