-
-
Notifications
You must be signed in to change notification settings - Fork 0
Upgrading
sudo apt update && sudo apt upgrade seafile-server seafile-server-dataSchema migration happens automatically: seafile-migrate.service runs before seafile.service/seahub.service start, and applies whatever schema changes are needed for the new version - nothing to run by hand. Databases are not backed up automatically before an upgrade - back up ccnet_db/seafile_db/seahub_db and the object store yourself first if you want a rollback path.
Downgrading the package itself is fine (apt install seafile-server=<older-version>). What's refused is running an older package's migration against data that's already ahead of it - if you downgrade the package but keep the same data directory, the services will refuse to start until you either reinstall the newer package version or restore a backup that actually matches the older one.
The data directory's schema version is tracked in a stamp file ($SEAFILE_DATA_DIR/current_version, alongside the object store). If seafile-migrate finds existing data (populated databases) but no stamp file at all, it refuses to guess which schema version it's actually at, rather than risk running the wrong migration:
existing $SEAFILE_DATA_DIR data has no version stamp
This happens with data that predates this packaging (e.g. restored from an old manual/docker install). If you know exactly which Seafile version that data was last run against, write it into the stamp file yourself and retry:
sudo -u seafile sh -c 'echo "12.0.15" > /var/lib/seafile/seafile-data/current_version'
sudo systemctl restart seafile-migrate seafile seahubGet the version wrong here and the schema upgrade will be applied incorrectly - if you're not certain, treat this as a fresh restore instead (start from a known-good backup with its own correct stamp).