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

Michael T. Dean mtdean at thirdcontact.com
Tue Dec 31 04:03:38 UTC 2013


On 12/30/2013 10:56 PM, tortise wrote:
> On 31/12/2013 4:33 p.m., Michael T. Dean wrote:
>> 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

use (how did I miss that word?)

>> , 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).
>
> Thinking about this (I do a version of this) but the links are all on 
> the OS HDD, in subdirectories under /www/ (so I can quickly browse the 
> files without waiting for all the recordings to load). An enhancement 
> would be to also put the links on each recording drive. As I don't 
> think mythlink.pl will separate out actual drives the recordings are 
> on I suppose a kludge would be to run mythlink.pl a number of times, 
> putting links on each storage HDD.

or you can copy the links created by the first run with cp -d 
(--no-dereference --preserve=links) to as many file systems as you like.

> In the event of drive failure there would be links on each HDD 
> appropriately named (plus a lot of potentially dead links also!) but 
> given the choice of having working and dead links vs no links I choose 
> the former!

Yeah, I've never considered dead links a bad thing when I had a drive 
failure--they're actually a great way to find out exactly which 
recordings I've lost so I can go back in and "Delete, and allow 
re-record" them.

Mike


More information about the mythtv-users mailing list