[mythtv-users] Migrating MythTV backend

Michael T. Dean mtdean at thirdcontact.com
Wed Oct 15 14:25:42 UTC 2008


On 10/15/2008 09:15 AM, Stackpole, Chris wrote:

> From: David Watkins
>>
>>> Also, I have not found an answer to this yet. Mythbuntu put the
>>> recording folder in /var/lib/mythtv. That's fine I guess, but I
>>> prefer to have my drives listed in /media and was considering
>>> having the 750GB drive listed as /media/mythtv. It doesn't really
>>> matter, just preference but I don't know if that is going to mess
>>> up MySQL when I transfer the database. I don't want it to think
>>> it is still in /var when the drive is in /media.
>>
>> When using Storage Groups it's possible to move recordings between
>> groups and mythtv just finds them, presumably based on their
>> filename? I infer from this that if you create a storage group on
>> your new build then you should be able to just put your recordings
>> in there and they'll be found, based on your existing database.
>>
>> Even if that doesn't work, providing you have a backup of your
>> database it's not too hard to make global changes to the backup
>> file using a text editor.  Just make sure you create that backup of
>> your database.
>
> Thanks for the info! I knew that there was something like that but I
> could not remember what it was called. I found a bunch of info on
> Storage Groups on the wiki and have already begun reading up on it.


However, in this case, you'll probably want to just specify the
/media/mythtv directory in your default storage group.  Since Mythbuntu
probably specified /var/lib/mythtv/ (trying not to make comments about
how /var is meant for short-term data ;) in the default storage group,
nothing will have changed from Myth's perspective.

In other words, MythTV does not store the file location in the
database.  It stores the storage group name and that storage group name
maps to a list of physical locations.  As long as the recording is in
one of the directories (physical locations) specified for the storage
group (logical name), no magic is involved--Myth just finds the file in
the same storage group it used to be in.  (Remember, a storage /group/
is not a directory--it's a list of directories.)

It's true that Myth will also look for the file in other storage groups
on the system, but there's no reason to put it in a different storage
group.  The whole purpose of having named storage groups is to abstract
physical file placement allowing you to change the file location without
having to change anything in the database other than the definition of
the storage group.

Mike



More information about the mythtv-users mailing list