[mythtv-users] Help needed with error in recordedseek table not fixed by optimize_mythdb
Paul Harrison
mythtv at sky.com
Sun Jan 28 23:04:39 UTC 2018
On 28/01/18 22:17, Craig Huff wrote:
> On Sun, Jan 28, 2018 at 4:09 PM, Craig Huff <huffcslists at gmail.com
> <mailto:huffcslists at gmail.com>> wrote:
>
> On Sun, Jan 28, 2018 at 4:00 PM, Paul Harrison <mythtv at sky.com
> <mailto: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.sqlPaul H.|
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20180128/fff973e1/attachment.html>
More information about the mythtv-users
mailing list