[mythtv-users] Moving a recording from one storage group to another.
Michael T. Dean
mtdean at thirdcontact.com
Sat Oct 30 15:31:39 UTC 2010
On 10/30/2010 11:01 AM, Jason Chambers wrote:
> On 30/10/2010 15:09, James Courtier-Dutton wrote:
>> I have two storage groups.
>> I wish to move a recording from one storage group to another.
>> How do I do this in myth?
>> I could do a simple "cp" at the command line, but I want the myth
>> database entry to move with it.
> That depends what you mean by "from one storage group to another". The
> database does not record which storage group or which volume/directory
> within a storage group a file is located in.
(Just a little clarification...)
MythTV does record which Storage Group a recording is stored within
(where Storage Group means "a logical name for a list of
directories"--i.e. "Default" or "Movies" or "James" or ...), but it does
not record which directory within that Storage Group the file is found
> When it need to access the
> file it simply searches through all directories configured for the
> storage group on the same host.
However, even though it does record which Storage Group the recording is
stored within, it will fall back to searching through directories listed
for other Storage Groups if the file cannot be found within the
directories listed by the specified Storage Group.
> So if you mean moving a recording between two volumes that belong to the
> /same/ storage group,
Or 2 directories that belong to different Storage Groups, but are both
accessible from the recording host. Due to the above-mentioned
fallback, you can simply move the recording file to any directory
defined on any Storage Group, as long as it's accessible from the same host.
> then you can simply move the file with "mv" from
> the command line and nothing needs changing in Myth as it will still
> find the file automatically.
> However if you want to move the recording to another backend (but still
> keeping it in the "Default" storage group) then you need to move the
> file *and* change the hostname in the database for that row, otherwise
> Myth will still thinks its located on the old host. I'm not aware of
> any proper way to do this so I guess you would have to resort to editing
> the database record yourself via SQL :-(
Exactly. And agreed on the :-(
> If you actually want to move it between two storage groups so that it
> moves from the Recordings screen into MythVideo (i.e. from the "Default"
> storage group to the "Videos" storage group)
Where, here, the key is that you're moving from a TV Storage Group to a
MythVideo Storage Group--meaning you're moving the recording into
MythVideo and out of Watch Recordings.
> then there is the
> mythvidexport.py script (http://www.mythtv.org/wiki/Mythvidexport.py).
> Haven't used it myself but it sounds like the perfect tool for the job.
Yes. A good way to archive recordings into MythVideo.
More information about the mythtv-users