[mythtv-users] Moving a recording from one storage group to another.

Jason Chambers lists at purplish-monkey.com
Sat Oct 30 15:01:16 UTC 2010


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.  When it need to access the
file it simply searches through all directories configured for the
storage group on the same host.

So if you mean moving a recording between two volumes that belong to the
/same/ storage group, 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 :-(

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) 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.


Regards,
Jason


More information about the mythtv-users mailing list