Subject: TicketsCAD v4.1.0 - automatic backups, a restore tool, and a fix for the Teams screen
Hi all,
v4.1.0 is out. Almost everything in it came from problems you ran into this
week, so thank you - the reports were specific enough to fix properly rather
than paper over.
WHAT'S NEW
Automatic backups, on by default. A daily backup now runs on its own. No setup
and no scheduler needed, though it works fine from cron or Windows Task
Scheduler if you prefer. You can change how often it runs, how many to keep,
and where they go.
Backups are verified, not assumed. Every archive is reopened and checked to
contain a real database dump before it counts as a success. A backup that
silently produced an empty file is not a backup, and TicketsCAD will now tell
you if there hasn't been a good one recently.
There is finally a restore tool. Run "php tools/restore.php <file>" and it
shows you what it would do without changing anything. Add --yes when you mean
it. It verifies the archive first and takes a safety backup of your current
database before it writes, so restoring the wrong file is itself undoable.
You can now prove a backup actually restores. "php tools/restore.php <file>
--drill" restores that backup into a temporary throwaway database, tells you
how many tables and rows came back compared to what you have live, then deletes
the temporary copy. Your real database is only read, never touched. If you do
one thing after upgrading, do this - untested backups are the ones that fail
when you need them.
The DMR bridge now runs in Docker. If your CAD is in a container there was no
supported way to run the radio bridge, because it assumed systemd. There is now
a container that runs the bridge and its AMBE vocoder together, configured
entirely with environment variables. See docs/RADIO-DMR-DOCKER.md. It refuses
to start if the vocoder isn't answering, because a bridge with a dead vocoder
otherwise connects normally and transmits silence, which is miserable to
diagnose from the receiving end.
There's a getting-started guide for people who aren't developers, at
docs/GETTING-STARTED-FOR-BEGINNERS.md - what TicketsCAD is, how to open it, the
"is it an address or a folder" confusion, and free links for learning the
command line, Docker and git.
WHAT'S FIXED
A damaged database table no longer looks like an empty list. After a power loss
or an unclean shutdown, one unreadable table could blank an entire screen -
which looks exactly like "all my data is gone" even though the records are fine
on disk. Those screens now name the damaged table, say the data is likely
recoverable, and link to the repair steps.
The Teams screen is fixed. Teams could exist with no name, and on some installs
Teams wouldn't load or save at all. The underlying cause was that the teams
table was defined in two different places with different columns, so which
version you ended up with depended on the order the setup scripts happened to
run. There is one definition now, and the upgrade brings any install onto it.
Four other tables had the same hazard and were consolidated too, and there's a
test that fails the build if it ever happens again.
Troubleshooting for MySQL not starting or not staying running, and for
recovering a crashed table after a power loss.
HOW TO UPDATE
If you cloned the repository with git, updating is one command:
Step 1 - git pull
Step 2 - php sql/run_migrations.php
If you're running Docker, you need the rebuild step as well, because pulling
alone does not update a container that's already running:
Step 1 - git pull
Step 2 - docker compose up -d --build
The migrations are safe to run more than once and don't delete anything. Take a
backup first anyway - and after this release, that's one command.
A word on git, since it keeps coming up. TicketsCAD is developed in the open and
fixes land continuously, often the same day someone reports them. If you're
tracking the repository with git, "git pull" gets you those fixes and
documentation corrections as they happen, instead of waiting for me to bundle
them into a numbered release. That's genuinely the best way to stay current,
and it's why I'm not going to cut a release every time a document gets
corrected. If git is new to you, there are two short walkthroughs:
As always, tell me what breaks.
Eric