-
-
Notifications
You must be signed in to change notification settings - Fork 0
Upgrade and Migration
This page describes safe upgrade and host-move workflows for Kanfei.
Covers:
- migrating from the
davis-wxalpha package - in-place upgrades between beta releases
- migration to a new host
- validation steps after cutover
If upgrading from the davis-wx alpha package, do not uninstall davis-wx before copying your data.
-
Stop the old services:
sudo systemctl stop davis-wx-web davis-wx-logger sudo systemctl disable davis-wx-web davis-wx-logger
-
Install the new package:
sudo apt install ./kanfei_0.1.0.beta3_all.deb
-
Stop the new services while you copy data:
sudo systemctl stop kanfei-web kanfei-logger
-
Copy your database and backgrounds:
sudo cp /var/lib/davis-wx/weather.db /var/lib/kanfei/kanfei.db sudo cp -r /var/lib/davis-wx/backgrounds/* /var/lib/kanfei/backgrounds/ 2>/dev/null || true sudo chown -R kanfei:kanfei /var/lib/kanfei
-
Copy your configuration from
/etc/davis-wx/davis-wx.confto/etc/kanfei/kanfei.conf. The format is the same — all variables now use theKANFEI_prefix. -
Start the new services:
sudo systemctl start kanfei-logger kanfei-web
-
Verify at http://localhost:8000 — historical data, settings, and dashboard layout should be preserved.
-
Once verified, remove the old package:
sudo apt purge davis-wx
No database migration is required between beta releases. The .deb package is a drop-in replacement:
sudo apt install ./kanfei_0.1.0.beta3_all.debAfter upgrading, check for new features in the release notes (e.g., enable automatic backups in Settings > Backup after upgrading to beta3).
- Record current version/commit and service state.
- Create a backup:
python station.py backup - Stop running services/processes.
- Deploy new code (
git pullor new package). - Start services/processes.
- Validate core functionality.
Minimum checks:
curl -s http://localhost:8000/api/station | jq .
curl -s http://localhost:8000/api/current | jq .
curl -s http://localhost:8000/api/config | jq 'length'UI checks:
- dashboard loads
- live updates flowing
- Settings page renders and saves
Optional feature checks:
- nowcast endpoints if enabled
- spray workflows if enabled
- upload integrations if enabled
- install prerequisites (Python/Node or package runtime)
- deploy Kanfei code/package
- confirm runtime user and hardware access (serial device permissions or network reachability)
Move these from source to destination:
- SQLite DB file (
db_path) .env- custom background assets directory (if used)
Preserve ownership and permissions.
- Stop source instance.
- Ensure DB is fully copied.
- Start destination instance.
- Validate endpoints/UI.
After migration to a new host:
- verify serial port assignments if using serial hardware (device paths may differ)
- verify network station reachability from the new host
- rerun setup/auto-detect if connection parameters differ
- confirm
/api/stationshows healthy connection
- station reconnects and polls successfully
- timestamps in
/api/currentare fresh - expected config values present
- optional integrations behave as expected
If upgrade fails:
- stop upgraded instance
- restore prior DB + config backup
- restart previous known-good build
- re-validate
/api/stationand/api/current
- Keep schema-affecting upgrades paired with tested restore points.
- If moving across architectures/OS variants, run a full smoke test before production cutover.