Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

Moving recordings between storage directories

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


g8ecj at gilks

Jul 23, 2007, 4:46 AM

Post #1 of 10 (7714 views)
Permalink
Moving recordings between storage directories

Greetings

I'm looking to retire an old harddrive that is providing one of two
storage directories on my system with a few gigs of shows on it.

Having moved the shows themselves across to the 'primary' store and
removed the old path in mythtv-setup, is there a simple way to update the
database as to where the files now physically reside having shifted them?

I guess its a one liner mysql statement but not having much of a clue
about databases how would I do a global change of /mnt/store1 to
/mnt/store2 ?

Cheers

--
Robin Gilks

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


william_munson at bellsouth

Jul 23, 2007, 4:53 AM

Post #2 of 10 (7678 views)
Permalink
Re: Moving recordings between storage directories [In reply to]

Robin Gilks wrote:
> Greetings
>
> I'm looking to retire an old harddrive that is providing one of two
> storage directories on my system with a few gigs of shows on it.
>
> Having moved the shows themselves across to the 'primary' store and
> removed the old path in mythtv-setup, is there a simple way to update the
> database as to where the files now physically reside having shifted them?
>
> I guess its a one liner mysql statement but not having much of a clue
> about databases how would I do a global change of /mnt/store1 to
> /mnt/store2 ?
>
> Cheers
>
>


If you are running 0.20 you just have to change the recordings direcory
in mythtv-setup. If SVN then remove your old dir and add the new one to
your list of storage directories. You should not have to do any SQL to
move the files.


_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


g8ecj at gilks

Jul 23, 2007, 4:20 PM

Post #3 of 10 (7654 views)
Permalink
Re: Moving recordings between storage directories [In reply to]

> Robin Gilks wrote:
>> Greetings
>>
>> I'm looking to retire an old harddrive that is providing one of two
>> storage directories on my system with a few gigs of shows on it.
>>
>> Having moved the shows themselves across to the 'primary' store and
>> removed the old path in mythtv-setup, is there a simple way to update
>> the
>> database as to where the files now physically reside having shifted
>> them?
>>
>> I guess its a one liner mysql statement but not having much of a clue
>> about databases how would I do a global change of /mnt/store1 to
>> /mnt/store2 ?
>>
>> Cheers
>>
>>
>
>
> If you are running 0.20 you just have to change the recordings direcory
> in mythtv-setup. If SVN then remove your old dir and add the new one to
> your list of storage directories. You should not have to do any SQL to
> move the files.

I'm running SVN (r14020 I think it was) so the storage directory stuff has
had all the wrinkles smoothed out!!

I tried copying a file from the old to the new location, unmounted the old
location and it just worked!! I didn't realise that the recording was only
tagged with the storage group and the members of the group are searched
for the recording in question - I had assumed (wrongly) that the recording
was tagged with the actual location it was stored in.

So it turns out that my problem isn't a problem after all!!

--
Robin Gilks

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


cpinkham at bc2va

Jul 23, 2007, 6:19 PM

Post #4 of 10 (7649 views)
Permalink
Re: Moving recordings between storage directories [In reply to]

* On Tue Jul 24, 2007 at 11:20:34AM +1200, Robin Gilks wrote:
> I tried copying a file from the old to the new location, unmounted the old
> location and it just worked!! I didn't realise that the recording was only
> tagged with the storage group and the members of the group are searched
> for the recording in question - I had assumed (wrongly) that the recording
> was tagged with the actual location it was stored in.

You can even move files between storage groups without updating the
database. If the recording file is not found in the proper Storage Group's
directories, then Myth will look in the Default Storage Group's directories,
and then it will look in all Storage Group directories. So you can move
files around into any valid directory that is defined in any Storage Group
and Myth will be able to find those files.

--
Chris
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


adeffs.mythtv at gmail

Jul 24, 2007, 5:43 AM

Post #5 of 10 (7645 views)
Permalink
Re: Moving recordings between storage directories [In reply to]

On 7/23/07, Chris Pinkham <cpinkham [at] bc2va> wrote:
> * On Tue Jul 24, 2007 at 11:20:34AM +1200, Robin Gilks wrote:
> > I tried copying a file from the old to the new location, unmounted the old
> > location and it just worked!! I didn't realise that the recording was only
> > tagged with the storage group and the members of the group are searched
> > for the recording in question - I had assumed (wrongly) that the recording
> > was tagged with the actual location it was stored in.
>
> You can even move files between storage groups without updating the
> database. If the recording file is not found in the proper Storage Group's
> directories, then Myth will look in the Default Storage Group's directories,
> and then it will look in all Storage Group directories. So you can move
> files around into any valid directory that is defined in any Storage Group
> and Myth will be able to find those files.
>

If Myth finds the recording to actually be in a different storage
group will it automatically update the database so in the future it
will find it "faster"? Which is I assume the only reason to store what
storage group it is stored in the database at all?

I'm trying to think of how to best set up my TVRage script to use the
Storage Groups feature and this part slightly baffled me =)

--
Steve
Before you ask, read the FAQ!
http://www.mythtv.org/wiki/index.php/Frequently_Asked_Questions
then search the Wiki, and this list,
http://www.gossamer-threads.com/lists/mythtv/
Mailinglist etiquette -
http://www.mythtv.org/wiki/index.php/Mailing_List_etiquette
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


cpinkham at bc2va

Jul 24, 2007, 9:34 AM

Post #6 of 10 (7652 views)
Permalink
Re: Moving recordings between storage directories [In reply to]

* On Tue Jul 24, 2007 at 08:43:55AM -0400, Steven Adeff wrote:
> If Myth finds the recording to actually be in a different storage
> group will it automatically update the database so in the future it
> will find it "faster"? Which is I assume the only reason to store what
> storage group it is stored in the database at all?

No, it will not automatically update the DB. I didn't want to build in
this much logic, because the same directory could be in multiple Storage
Groups on a single or multiple backends. Searching the other Storage
Group directories is just a last-ditch attempt to find the file if it is
not found in the proper Storage Group. One of my original thoughts
behind this was also to allow archiving of files to other storage without
touching the DB. As long as the other storage directory was listed in
at least one Storage Group, then Myth would still be able to find the
file.

> I'm trying to think of how to best set up my TVRage script to use the
> Storage Groups feature and this part slightly baffled me =)

The code would have to be modified in quite a few places to allow
changing the DB and it would always be accurate if the same directory
was listed twice, so I thought it best to leave the DB alone.

--
Chris
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


adeffs.mythtv at gmail

Jul 24, 2007, 1:48 PM

Post #7 of 10 (7625 views)
Permalink
Re: Moving recordings between storage directories [In reply to]

On 7/24/07, Chris Pinkham <cpinkham [at] bc2va> wrote:
> * On Tue Jul 24, 2007 at 08:43:55AM -0400, Steven Adeff wrote:
> > If Myth finds the recording to actually be in a different storage
> > group will it automatically update the database so in the future it
> > will find it "faster"? Which is I assume the only reason to store what
> > storage group it is stored in the database at all?
>
> No, it will not automatically update the DB. I didn't want to build in
> this much logic, because the same directory could be in multiple Storage
> Groups on a single or multiple backends. Searching the other Storage
> Group directories is just a last-ditch attempt to find the file if it is
> not found in the proper Storage Group. One of my original thoughts
> behind this was also to allow archiving of files to other storage without
> touching the DB. As long as the other storage directory was listed in
> at least one Storage Group, then Myth would still be able to find the
> file.
>
> > I'm trying to think of how to best set up my TVRage script to use the
> > Storage Groups feature and this part slightly baffled me =)
>
> The code would have to be modified in quite a few places to allow
> changing the DB and it would always be accurate if the same directory
> was listed twice, so I thought it best to leave the DB alone.

ok, cool. Out of curiosity: so why the "groups" instead of just a list
of directories to look in with a "pecking order" for finding
recordings?

--
Steve
Before you ask, read the FAQ!
http://www.mythtv.org/wiki/index.php/Frequently_Asked_Questions
then search the Wiki, and this list,
http://www.gossamer-threads.com/lists/mythtv/
Mailinglist etiquette -
http://www.mythtv.org/wiki/index.php/Mailing_List_etiquette
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Jul 24, 2007, 2:20 PM

Post #8 of 10 (7647 views)
Permalink
Re: Moving recordings between storage directories [In reply to]

On 07/24/2007 04:48 PM, Steven Adeff wrote:
> ok, cool. Out of curiosity: so why the "groups" instead of just a list
> of directories to look in with a "pecking order" for finding
> recordings?

To give you as much (by using multiple storage groups) or as little
(using only one group called default) control over recording location as
you like. (Before it can be found in a directory, the file has to be
recorded there.)

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


cpinkham at bc2va

Jul 24, 2007, 3:05 PM

Post #9 of 10 (7646 views)
Permalink
Re: Moving recordings between storage directories [In reply to]

* On Tue Jul 24, 2007 at 05:20:21PM -0400, Michael T. Dean wrote:
> On 07/24/2007 04:48 PM, Steven Adeff wrote:
> > ok, cool. Out of curiosity: so why the "groups" instead of just a list
> > of directories to look in with a "pecking order" for finding
> > recordings?
>
> To give you as much (by using multiple storage groups) or as little
> (using only one group called default) control over recording location as
> you like. (Before it can be found in a directory, the file has to be
> recorded there.)

Exactly. Searching for files during playback is easy. The main beauty
(and logic) of Storage Groups is on the recording side. I have 5 tuners
and 4 unique recording directories. The master backend with (3) AverMedia
analog cards can write to two large NFS shares while the slave backend
with (2) air2pc ATSC cards can write to its own two local drives preferably
then will fallback to using the NFS shares if the local drives fill up.
During times when there are 3-4 recordings and a playback going on, it is
normal for all 4 drives to be in use with a single recording going to
each one. Benefits of this have been explained quite a bit on the lists so
I won't get into that. :)

--
Chris
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


adeffs.mythtv at gmail

Jul 24, 2007, 8:21 PM

Post #10 of 10 (7628 views)
Permalink
Re: Moving recordings between storage directories [In reply to]

On 7/24/07, Chris Pinkham <cpinkham [at] bc2va> wrote:
> * On Tue Jul 24, 2007 at 05:20:21PM -0400, Michael T. Dean wrote:
> > On 07/24/2007 04:48 PM, Steven Adeff wrote:
> > > ok, cool. Out of curiosity: so why the "groups" instead of just a list
> > > of directories to look in with a "pecking order" for finding
> > > recordings?
> >
> > To give you as much (by using multiple storage groups) or as little
> > (using only one group called default) control over recording location as
> > you like. (Before it can be found in a directory, the file has to be
> > recorded there.)
>
> Exactly. Searching for files during playback is easy. The main beauty
> (and logic) of Storage Groups is on the recording side. I have 5 tuners
> and 4 unique recording directories. The master backend with (3) AverMedia
> analog cards can write to two large NFS shares while the slave backend
> with (2) air2pc ATSC cards can write to its own two local drives preferably
> then will fallback to using the NFS shares if the local drives fill up.
> During times when there are 3-4 recordings and a playback going on, it is
> normal for all 4 drives to be in use with a single recording going to
> each one. Benefits of this have been explained quite a bit on the lists so
> I won't get into that. :)
>

ahh, cool, thanks for the low-down guys!

--
Steve
Before you ask, read the FAQ!
http://www.mythtv.org/wiki/index.php/Frequently_Asked_Questions
then search the Wiki, and this list,
http://www.gossamer-threads.com/lists/mythtv/
Mailinglist etiquette -
http://www.mythtv.org/wiki/index.php/Mailing_List_etiquette
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.