Updates
The most important promise first: an update never deletes the fleet database and never recreates it. All existing data is fully preserved.
How an update works
Development Server Workstations
----------- ------ -----------
Release package ---> Updates\1.1.0\ ---> Notice at startup
Updates\latest.json Run the update
Restart the program
In the update folder on the server sits the file latest.json. It states which
version is current. Every workstation reads it at startup and reports when a
newer version is available.
Structure of the update folder
D:\Fleet\Updates\
latest.json describes the current version
1.1.0\
Vehistra-Update.exe the update package itself
release-notes.txt what has changed
checksums.sha256 checksums of all files
Dokumentation\ the guides for this version
Archive\
1.0.0\ the previous version
The previous version stays in the Archive folder. That is your way back.
Publishing a new version
- Extract the release package into a new version folder.
- Compare the checksums.
- Point
latest.jsonat the new version.
From the next program start the workstations report the update themselves.
What happens during the update
-
Before the start the checksum of the update package is verified. The expected value comes from
latest.json; if it is missing, the checksum file next to the package applies. If it does not match, or if neither exists, the update does not start. The check sits in the update service, not in the interface. -
Under “Updates” the result is shown in plain words before you click install.
-
Before every database change a backup is created and verified. If the backup fails, the update stops.
-
If several workstations start at the same time, a lock in the database prevents the migration from running twice.
-
Migrations build on each other; nothing is deleted and nothing is recreated.
Going back to the previous version
The way back is always: install the previous program version from Archive and
restore the backup from before the update – see
Backup and restore.
That is why the backup before the update is not optional.
What the checksum does – and what it does not
It detects a package that was copied incompletely or altered afterwards. It does
not protect against someone who may write to the update share: whoever
swaps the package can change the checksum in latest.json along with it.
Two things help against that:
- an update folder that only administrators may write to,
- a code signature on the packages.