I run my Seafile server on a Raspberry Pi 4 (32-bit). I’ve started some major versions ago, with a very manual install from the tar.gz bundles. I’m now on major version 8. For some time, I’ve started re-engineering my Pi 4 “home lab” installation through Ansible, so that the day that disaster strikes, I can recover faster. Seafile has been a pain, because, while anything can be automated with Ansible, the manual install I’ve done seems like a lot of work. I’ve been willing to start using some kind of Docker version for some time. The official containers do not support 32-bit ARM, so I’ve settled on the apparently excellent franchetti/seafile-arm. This also has the benefit of allowing to keep using SQLite instead of MySQL (I’m a single user with infrequent access and fairly limited amounts of data). The issue lies in properly migrating the data.
I’ve started the container once with a dummy volume. That container, with a new volume, creates a basic installation and configuration. I’ve then built a similar structure, reusing my existing conf and data folders.
When I bring it up on the new volume, some things seem to work; namely I can log in to the web portal (via nginx) with my real password rather than the one set up in the environment variables while starting the container. This tells me that the container detects the existing installation and does not overwrite the configuration with the default password.
However, even though I moved seafile-data, seafile.db and seahub.db to the rights places – I think ! --, when I land on the home page, I’m told I have no libraries.
Does anyone have experience of similar migrations, and have an idea of where I should look for a mistake?
For the sake of clarity, I include here the tree view of the volume I’m passing to the container.
tree -L 2 . ├── conf │ ├── ccnet.conf │ ├── gunicorn.conf.py │ ├── __pycache__ │ ├── revision │ ├── seafdav.conf │ ├── seafile.conf │ └── seahub_settings.py ├── logs │ ├── controller.log │ ├── onlyoffice.log │ ├── seafile.log │ └── seahub.log ├── media │ ├── assets │ ├── avatars -> ../seahub-data/avatars │ ├── cors │ ├── css │ ├── custom -> ../seahub-data/custom │ ├── fontawesome │ ├── img │ ├── js │ ├── locales │ ├── office-template │ └── version ├── seafile-data │ ├── httptemp │ ├── library-template │ ├── seafile.db -> ../sqlite/seafile.db │ ├── storage │ └── tmpfiles ├── seahub-data │ ├── avatars │ └── thumbnail └── sqlite ├── GroupMgr ├── misc ├── OrgMgr ├── PeerMgr ├── seafile.db └── seahub.db
And my temporary docker-compose (meant to put things in place before I implement the setup in Ansible):
version: '2.0' services: seafile: image: franchetti/seafile-arm:8.0.7 container_name: seafile volumes: - /media/m3/docker-volumes/seafile:/shared ports: - 8924:8000 # to allow the previous install of seafile to keep running without conflict - 8926:8082 environment: - TZ=Europe/Zurich - SERVER_IP=my.real.domain - USE_HTTPS=0 # nginx handles https - SEAFILE_ADMIN_EMAILfirstname.lastname@example.org - SEAFILE_ADMIN_PASSWORD=secret - SQLITE=1 networks: - homelab