[mythtv] an idea from ruby on rails

Michael T. Dean mtdean at thirdcontact.com
Fri Jan 25 19:00:08 UTC 2008


On 01/25/2008 12:45 PM, Chris Pinkham wrote:
> * On Fri Jan 25, 2008 at 08:51:44AM -0500, Michael T. Dean wrote:
>   
>> That someone has just been doing too much traveling lately.  I happen to
>> know he has 2 weeks set aside for working on it from home starting next
>> week.  :)
>>     
> Do you know where he :)  is going to put these?  Perhaps there should be a
> special case "DB Backups" Storage Group as well.

Yep, though I had just called it "Backup".  I guess yours is more
descriptive (and would prevent users from thinking we somehow squeezed
their 3TB of recordings into a 200MB file).  And, in the event that the
user doesn't have a DB Backup storage group, the default storage group
will be used (meaning the DB backup before the schema upgrade from
0.20-0.21 will still work).  Heh.  I actually mentioned the Backup
storage group way back in September--
http://www.gossamer-threads.com/lists/mythtv/users/288037#288037 --and
even then, I was way "late" on the patch.  I really need to get this done.

>   We can make a method
> in the Storage Groups class to list all groups available for recordings
> and eliminate some of these special groups.

Yeah.  Wasn't sure whether they should be eliminated from the scheduled
recording editor's selections or left (if the user /wants/ recordings in
DB Backup or Thumbnails or ...).  I was planning on asking you in IRC. 
I like the idea of eliminating them (so people don't mistakenly choose
the wrong group and so we can keep the list clean).

>   The scheduled recording
> editor could use this method to get the list of allowed SGs for
> scheduled recordings.  I keep my DB (and all system) backups on a
> separate drive and server to give a little more protection.

Yep.  Exactly why I wanted a user-configurable location.  And, I had
come to the conclusion that using the Storage Groups functionality, like
LiveTV does, would be the best approach since it allows that possibility
without any new settings! :)  I also planned to allow backup rotation,
but can't think of a way to do that without a setting(s) (MaxDBBackups
or MaxDBBackupStorage or MaxDBBackupAge or ...).  Do you think that's
better handled externally, with settings, as a special configuration for
the special DB Backups storage group, or any other suggestions for it?

Unfortunately, the storage group stuff--and even the backup part,
itself--is the easy part.  Making the changes to the housekeeper (to
allow the job to run only if no recordings/LiveTV are in progress and if
no recordings are about to start; and to allow a "run anyway," i.e. for
mfdb; and ...) is a bit more complex (especially since I'd like to make
the housekeeper changes/support code usable for the jobqueue stuff,
too).  Would you be interested in a "preliminary" backup patch with a
"hidden" (DB only--no GUI) setting for specifying backup times (using
the normal housekeeper period/minhour/maxhour) with a follow on patch
for the housekeeper changes and the "final" backups config?   This way
we could potentially get more different people with different MySQL
configs testing the backup patch earlier.  Though the housekeeper
changes are more complex, I think the MySQL stuff is likely to have more
need of widespread testing because of the different MySQL configs in use.

Hmmm.  Now that I think about it, I will take this approach.  If you (or
whoever) don't get time to review/fix/commit the patch before I finish
the housekeeper patch it will be easy enough to combine them (or, if the
backup patch doesn't touch housekeeper, then submit them as
separately-reviewable patches).  And, if nothing else, I can beg people
to help test the backup patch before it's committed.  :)

Mike


More information about the mythtv-dev mailing list