[mythtv-users] Remove an entire storage group and delete all recordings in it

Michael T. Dean mtdean at thirdcontact.com
Fri Dec 24 18:28:58 UTC 2010

  On 12/24/2010 11:11 AM, George Nassas wrote:
> On 2010-12-24, at 9:57 AM, Brent Bolin wrote:
>> Example:
>> /var/lib/mythtv/recordings
>> /some/other/location (want to remove this one)
> Of course it's easy enough to remove the directory/storage group using mythtv-setup but the trick is to get myth to isolate the recordings in that dir so they can be deleted.
> I think you have to resort to sql

No.  (And the SQL has some issues, anyway.)

Your best bet is to remove the Storage Group from mythtv-setup ( 
http://www.gossamer-threads.com/lists/mythtv/users/443159#443159 --so on 
the mythtv master backend, run mythtv-setup (with all backends shut 
down) and highlight the other storage group and hit Delete***).  Then, 
assuming that there are no other storage groups that include the 
directory /some/other/location (if not, see the *** below), start all 
your mythbackend processes on all hosts, run find_orphans.py ( 
http://www.mythtv.org/wiki/Find_orphans.py , and see 
http://www.mythtv.org/wiki/Category:Scripts for how to download it), and 
tell it to remove the recording metadata for the "Recordings with 
missing files".

 From this point, you can do what you want with the /some/other/location 
directory and its contents.


***And, if you--like most users--don't get the difference between a 
Storage Group (list of directories) and a directory (something you put 
into one or more Storage Groups), and you really meant that you want to 
delete a directory from a Storage Group and remove all the files in that 
directory (or if /some/other/location exists in multiple Storage 
Groups), you would still use the above procedure, except you must go 
into mythtv-setup on each backend on which you've specified directory 
lists for storage groups, find /some/other/location in any Storage Group 
in which it exists, highlight that directory, and hit D to delete.

More information about the mythtv-users mailing list