Server Version: 12.0.14; currently installed via Docker on an intel Mac Mini running Mac OS. Behavior is mostly stable, but I have to periodically reboot it for seemingly no reason and I feel putting it on a Linux bot is smarter for the future before I start thinking about updating it. I have an Orange Pi (ARM 64) device that I think will run this well.
This is my provisional battle plan. I am wondering if anyone familiar could kindly just peek at my planned order of operations and let me know if any obvious problems jump out at them or if anything is obviously missing or completely unnecessary
Export db. Shut down, bring up only the db container to avoid conflicts, dump data, then shut down again:
cd /opt/seafile
docker compose down
docker compose up -d db
docker exec seafile-mysql sh -c 'exec mysqldump --all-databases -uroot -p"$MYSQL_ROOT_PASSWORD"' > /opt/seafile/database_dump.sql
docker compose down
docker ps -a #confirm nothing's still up.
Archive Data:
sudo tar -czvf seafile-migration.tar.gz /opt/notification-data /opt/onlyoffice /opt/seafile /opt/seafile-data /opt/seafile-elasticsearch /opt/seafile-mysql /opt/shared
Extract after Transferring Data:
# Sync seafile-migration.tar.gz to new (Linux) host.
# Extract data directly to the new root directory to recreate the /opt paths:
sudo tar -xzvf /tmp/seafile-migration.tar.gz -C /
Fix permissions, aligning host directory ownership with the internal container UIDs:
sudo chown -R root:root /opt/seafile-data /opt/notification-data /opt/shared /opt/seafile
sudo chown -R 999:999 /opt/seafile-mysql/db
sudo chown -R 1000:1000 /opt/seafile-elasticsearch/data
sudo chown -R 109:112 /opt/onlyoffice
Spin up new containers using the exact same configuration files
cd /opt/seafile # parent dir can be owned by docker user or root
sudo sysctl -w vm.max_map_count=262144
echo "vm.max_map_count=262144" | sudo tee -a /etc/sysctl.conf
docker compose up -d
Verify Database Status
Try to go live from the sql data already included in the transferred volumes
# Wait ~30 seconds, then confirm MariaDB accepted the raw Mac binaries.
# If this outputs a line ending in "ready for connections", migration is complete:
docker logs seafile-mysql | grep -i "ready for connections"
#or check `docker compose ps` for "healthy" status
Database Restore (Fallback) if above fails:
docker compose stop db
sudo rm -rf /opt/seafile-mysql/db/*
docker compose start db
# Wait ~30 seconds or until db process is healthy, then:
cat /opt/seafile/database_dump.sql | docker exec -i seafile-mysql sh -c 'exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD"'