[mythtv-users] Database damage?

Craig Treleaven ctreleaven at cogeco.ca
Wed Feb 10 16:44:30 UTC 2021


I’m trying to resurrect my Myth system (0.28-fixes with MariaDB 5.5 on OS X).  Some months ago, I noticed that all of my recordings were failing.  I then found that the mythbackend log had hundreds of pairs of entries like the following:

2021-02-08 13:44:12.761647 E [55541/775] CoreContext programinfo.cpp:2616 (GetPlaybackURL) - ProgramInfo(1411_20190311025900.ts): GetPlaybackURL: '1411_20190311025900.ts' should be local, but it can not be found.
2021-02-08 13:44:12.761688 E [55541/775] CoreContext mainserver.cpp:3061 (DoHandleDeleteRecording) - MainServer: ERROR when trying to delete file: GetPlaybackURL/UNABLE/TO/FIND/LOCAL/FILE/ON/MediumMini.local/1411_20190311025900.ts. File doesn't exist.  Database metadata will not be removed.

In mythfrontend, Watch Recordings/All Programs says I have 1,132 recordings consuming 4,028.30 GB.  All my recordings are stored on an external drive and I have triple checked the path to the recordings directory in mythtv-setup.  There are 2,090 files—recordings and previews--in the relevant directory consuming 3.96 TB.  Note that I can successfully play various old recordings in mythfrontend.  I don’t have MythWeb running.  I think my recordings started failing when the number of bad entries got so large that it took too long trying to go through them.

I tried to run find_orppans.py.  It found 673 recordings with missing files.  If I select "Delete orphaned recording entries”, I get the message:

Warning: Failed to delete 'MediumMini.local: Republic of Doyle - The Driver'

Then the list of orphaned recordings, etc, is re-displayed—nothing has apparently been fixed.

Checking the MariaDB error log, quite a few tables are marked as crashed, e.g. settings, recorded, oldrecorded, etc.  I have a daily backup of the database (using mythconverg_backup.pl) and I run optimize_mythdb.pl on a daily basis.  Even though optimization complete successfully, it MariaDB complains the next time I start the database.

Any suggestions?  I’m thinking to nuke the database and do a partial restore and then see if find_orphans.py will give me a true list of my recordings.  Or is there an easy database tool that might fix whatever is wrong in situ?

If I can get the recordings back, I’m going to look into migrating to 31.


More information about the mythtv-users mailing list