[mythtv-users] oh no! - update mysql

Bruce Markey bjm at lvcm.com
Fri Oct 28 17:28:11 EDT 2005


Todd Houle wrote:
> i accidently deleted my /video directory...  I meant just /video/music 
> but oops.  that's why I never got that sysadmin job...

There was a time in the '90s in Silicon Valley where this would
show that you knew of "rm -rf" making you a leading candidate for
a 50-100k job ;-).

> What tables to I need to modify in Mysql to empty things out?  so i can 
> start recording again?  I just did recorded, but under upcoming 
> recordings in mythtv, I still see "T - Max Recordings".   even though my 
> media library says "no recordings"...

First, backup your database before making any manual changes:

http://www.mythtv.org/docs/mythtv-HOWTO-22.html#ss22.5

Do I need to explain why you may want to do this =)?

The information about your recordings is in the "recorded" table.
First, grab a list of the missing shows and episodes:

$ mysql -u mythtv -pmythtv mythconverg
mysql> select title,subtitle from recorded where hostname='yourhost' order by title;

Cut'n'paste this into a file that you can look at later.

If you have slaves with local disks, you do not want to remove
the entries for those recording that you still have. You can remove
just the recordings for the host where the recordings are missing
with:

$ mysql -u mythtv -pmythtv mythconverg
mysql> delete from recorded where hostname="yourhost";

If, however, you have just the one backend, you can:

mysql> truncate table recorded;
mysql> truncate table recordedmarkup;
mysql> truncate table recordedprogram;
mysql> truncate table recordedcredits;
mysql> truncate table recordedrating;

[Don't bother with these other tables if you still have recordings
on other hosts. It's to much trouble to pluck out the right stuff
and a little cruft won't hurt you.]

This will fix the too many recordings problem and clean up the
Watch Recordings page.

Next, if you want to try to re-record the things that were deleted,
go to the "Previously Recorded" page and view it sorted by title.
Look at the list of titles and subtitles you made earlier and find
them on this page. For each one you find, press Enter and click
"Remove this episode from the list". This will allow it to re-record
if it is shown again.

Hope this helps.

--  bjm




More information about the mythtv-users mailing list