[mythtv-users] Help needed with error in recordedseek table not fixed by optimize_mythdb

Craig Huff huffcslists at gmail.com
Mon Jan 29 00:12:09 UTC 2018


On Sun, Jan 28, 2018 at 5:04 PM, Paul Harrison <mythtv at sky.com> wrote:

> On 28/01/18 22:17, Craig Huff wrote:
>
> On Sun, Jan 28, 2018 at 4:09 PM, Craig Huff <huffcslists at gmail.com> wrote:
>
>> On Sun, Jan 28, 2018 at 4:00 PM, Paul Harrison <mythtv at sky.com> wrote:
>>
>>>
>>> If you can't repair the recordedseek table one option is to truncate it
>>> and restore just that table from your old backup. That way only the
>>> seektables for new recordings will be missing which you can fix by running
>>> 'mythutil --checkrecordings  --fixseektable'
>>>
>>> Paul H.
>>>
>>>
>> Paul-
>>
>> Re-creating the seektable data for the new recordings it what I was
>> hoping to do, but the trick I haven't figured out yet is how to restore
>> just the recordedseek table.
>>
>> Can you give me more details on that?
>>
>>    - How do I truncate it (presumably the recordedseek table)?
>>    - How would you suggest I restore the recordedseek table from the
>>    backup?
>>
>> --
>> Craig.
>>
>
> Looks like truncation would involve launching an interactive mysql session
> and invoking the command "TRUNCATE TABLE recordedseek;".  Correct?
>
> --
> Craig.
>
>
> Yes that will remove all the data from the recordedseek table. I would
> also drop the table as well since the backup will recreate it.
>
> Your backup will contain all the data for all tables so you will have to
> create a new one with just the recordedseek data in it. That's the tricky
> bit because if you have a lot of recordings the backups are very large. You
> can if they are small enough edit it in a text editor but most are to large
> to do that.
>
> Easiest way is probably to run a sed command to extract it something like
> this works for me
>
> sed -n -e '/CREATE TABLE.*`recordedseek`/,/UNLOCK TABLES;/p' mythconverg-1348-20171215001052.sql > recordedseek.sql
>
>
> Paul H.
>
> Paul,

I thought to use mythconverg_restore.pl to restore the recordedseek table
after replacing the contents of my equivalent of
mythconverg-1348-20171215001052.sql with the recordedseek.sql contents
(after making a backup copy of mythconverg-1348-20171215001052.sql
elsewhere).

That didn't work because the rest of the database is still there and the
restore program didn't like that -- not really a surprise.  So, I guess I
need to feed the recordedseek.sql file into a mysql command line as a
command file.  I can figure that out.  I think I've even done it before.

Many thanks to all for your input.  If this works, I won't clutter the
maillist with more traffic.  If you hear from me, it'll be because I'm
stuck again.

--
Craig.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20180128/590725de/attachment.html>


More information about the mythtv-users mailing list