[mythtv-users] WAF through the floor, with lost database!

Michael T. Dean mtdean at thirdcontact.com
Tue Dec 31 03:33:12 UTC 2013


On 12/30/2013 06:00 PM, Paul Gardiner wrote:
> So the dreaded disaster has happened, so now how can I populate
> mythtv's recordings from all the orphaned files I have. I realise
> the best I can probably do is make names from channel, date and
> time, but what tables would I need to update to do so? I'm guessing
> there are some risks involved if you don't ensure consistency
> between the various tables.

Ideally you'd identify the shows/episodes and name the files 
appropriately and put them in Video Library so that it could look up the 
metadata for the episodes and populate all the metadata for you.  See
http://www.gossamer-threads.com/lists/mythtv/users/510542#510542 and
http://www.gossamer-threads.com/lists/mythtv/users/519758#519758 and
http://www.gossamer-threads.com/lists/mythtv/users/519996#519996 .

FWIW, it's good to have a "safe" view of the recording files that you 
can use as a "just in case" in the event of a catastrophic database 
loss.  You can set up a cron job to run mythlink.pl to create a view of 
your recordings say, once per day--but, unlike the mythlink.pl job(s) 
that create links that you actually, harden the script to ensure you'll 
still have the links when you lose the database.  So, for example, wrap 
the mythlink.pl call in a script that ensures mythbackend is up and 
valid (has approximately the right number of recordings) or--my personal 
favorite--create separate directories for the views, each named with the 
current date, and rotate appropriately (keeping a few days or a couple 
weeks worth of view directories).

If you had one of these, it would be a simple matter of using the link 
names to rename the files before dropping them into Video Library.

Without, you may have to just start playing each file to identify the 
series, and keep the date/time information to keep relative order, and 
use ttvdb.com or tmdb.com or tv.com to try to identify the episodes.  In 
other words, you likely have a large job in front of you.  (That said, a 
new MythTV system will do its best to help out--recording any episodes 
of shows you want (including repeats) since there's no recording history 
for duplicate detection.)

> Also, given that I have another separate mythtv system that has
> been running mythfilldatabase relentlessly for years,
> is there any way I might turn channels, dates and times back into
> titles? I'd imagine that past listing info is forgotten, but
> I've never looked so, just wondering.

Old listings information is removed after 2 weeks, with the exception of 
the information about episodes for which you have recordings.

Some (but not all) information is kept about episodes that you have 
recorded--whether those recordings still exist or not.  You can find it 
in the Previously Recorded screen of mythfrontend.  So, if you have any 
overlaps of (successfully) recorded shows, you may be able to find 
information about those.

Mike


More information about the mythtv-users mailing list