Mailing List Archive

'apt update' nearly borks database
I'm still on 30-fixes, using the deb-multimedia packages. I do OS updates infrequently and manually
so as to have some control over the process.

This morning I did 'apt update' and the result was 39 packages including the kernel, intel-microcode
and a load of mythtv packages. So, 'apt upgrade'... what can possibly go wrong?

It downloaded everything and began the upgrade, then hung on 'mythtv-database'. It then shows a
dialog asking for a root username, as though it is setting up a fresh database... not good news. And
it is at that point I realize I hadn't done a backup beforehand.

At the end, there are update failures. I try mythweb, which fails. Looking at the error messages on
the console, I notice that it had been attempting to access the *wrong* host IP address. Why?

I do some checks. As I run mythbackend from the mythtv user, there are only two live copies of
config.xml, one under /home/mythtv/.mythtv and the other under /etc/.mythtv. The
/etc/mythtv/config.xml file has an incorrect IP address, obtained from who knows where.

I fix it and rerun the 'apt update'. Everything proceeds to completion, mythweb runs fine. I reboot
from orbit just to make sure. Phew!

The morals of this tale: (i) Make sure you only have one copy of config.xml and that everything else
links to it; (ii) The update process uses /etc/mythtv/config.xml while mythbackend uses
~/.mythtv/config.xml; (iii) Make sure the information in config.xml is correct; and (iv) If you see
any reference to any mythtv modules during an OS update operation, STOP RIGHT THERE and take a
database backup, if you haven't already done so.

--

Mike Perkins

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org