JP Vossen via plug on 7 Jul 2020 23:43:08 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] MythTV: WHYY/PBS frequency finally changed


For anyone still using OTA for MythTV or similar, the local Philly WHYY/PBS frequency finally changed in the last few days (circa 2020-07-03?).

This was scheduled at least twice and didn't happen (http://tvanswers.com/whenResultsZip.asp), so I forgot about it until I just noticed 2 shows failed to record.

My MythTV process to fix it turned out to be really simple...I thought. Then, of course, it broke, since it's MythTV and that's what it does. My symptoms after the rescan were schedule (EPG) and upcoming recordings were empty and `mythfilldatabase --dd-grab-all` = "No channels are configured to use grabber" which means that the "xmltvid" fields got lost.

To make a long story shorter, what I *should* have done was:
```
$ cd (to whatever user)
$ /usr/share/mythtv/mythconverg_backup.pl --backup_xmltvids --directory .
```

GUI: Applications > System > MythTV Backend Setup (will CLOSE Myth Server!)
	[*] 6. Channel Editor
		Use [DELETE] to delete all channels
		Channel Scan (can take forever)
	Answer "no" to running "mythfilldatabase"

```
$ /usr/share/mythtv/mythconverg_restore.pl --restore_xmltvids --directory . --filename mythtv_xmltvid_backup-20200708013025.sql # change file name!
$ sudo systemctl restart mythtv-backend.service
$ sleep 2m ; mythfilldatabase --dd-grab-all
```

Of course I didn't know about `mythconverg_backup.pl` and while I do have `mysqldump` backups of everything, it was...everything and I wasn't sure what a full restore of that would do.

The manual way to fix missing xmltvid fields is to open (in my case):
1. The SchedulesDirect lineup report: https://www.schedulesdirect.org/lineups/report/PC%3A19426 2. The MythWeb Channel Info: http://mythtv-be-01.jpsdomain.org/mythweb/settings/tv/channels
3. Lots of painful copy & paste between them

But then I found https://www.mythtv.org/wiki/Database_Backup_and_Restore
Esp.: https://www.mythtv.org/wiki/Database_Backup_and_Restore#Restore_xmltvids_after_a_channel_scan

The restore after you break it can't help if you didn't do the backup before you broke it, but my MythTV server is a VM and I was smart enough to snapshot it. So I only had to save my state, restore my snapshot, grab the backup and copy it elsewhere, revert my state, copy the file back and restore it. Bang, everything was happy again.

Why the xmltvid fields got nuked in the first place...well, it's MythTV, why ask why?

Hopefully this will be useful to someone else,
JP
--  -------------------------------------------------------------------
JP Vossen, CISSP | http://www.jpsdomain.org/ | http://bashcookbook.com/
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug