[mythtv-users] Fixing minor errors in Myth database

Michael T. Dean mtdean at thirdcontact.com
Sun Apr 28 20:46:28 UTC 2013


On 04/28/2013 02:35 PM, Fred Hamilton wrote:
> Thanks Paul.
>
> Now, as Mike suggested might happen, the partial update failed. 
>  Here's the relevant bit from the --verbose output:
> ----------------------------------------------------------------------------
> Found 81 tables in the database.
>
> Backup file is compressed.
>  - Uncompressing backup file with IO::Uncompress::Gunzip.
>
> Attempting to use supplied password for mysql command-line client.
> Any [client] or [mysql] password specified in the MySQL options file will
> take precedence.
>
> Restoring partial backup with filter:
> (40101 SET NAMES |^INSERT INTO 
> \`?(oldrecorded|record|recorded|recordedmarkup|recordedprogram|recordedrating|recordedseek)\`? 
> )
>
> Executing command:
> 'mysql' --defaults-extra-file='/tmp/GLxgJIcvg0' --host='192.168.1.100' 
> --port='3306' --user='mythtv' 'mythconverg'
> ERROR 1054 (42S22) at line 7: Unknown column 'offset' in 'field list'
>
> ERROR: Cannot write to mysql, stopped at 
> /usr/share/mythtv/mythconverg_restore.pl line 1720, <BACKUP> line 2828.
> ----------------------------------------------------------------------------
>
> Any ideas anyone?

Take your full backup and run the following command at the shell prompt:

gzip -d -c mythconverg-1264-20130425182924.sql.gz |
   sed '/INSERT INTO `recordedmarkup`/d' > 
/tmp/mythconverg-no_recordedmarkup.sql


Note the backticks (which may have been changed by your mail client) 
around recordedmarkup--if you use forward ticks/apostrophes, the command 
won't work.

Then take the resulting output ( /tmp/mythconverg-no_recordedmarkup.sql 
) and use that for the partial restore with the --directory=/tmp 
--filename=mythconverg-no_recordedmarkup.sql .  This basically just 
removes the recordedmarkup data.  Feel free to use a different directory 
if your /tmp is too small.

Once you've completed the partial restore and fully reconfigured your 
system (backend and frontends), you'll want to re-run commercial 
detection on every recording.  As a matter of fact, you may even want to 
rebuild the seek table on recordings (using mythcommflag --rebuild ) to 
get a few other pieces of information that's supposed to be there, but 
it should work fine without doing so.

http://www.mythtv.org/wiki/Repairing_the_Seektable

Mike


More information about the mythtv-users mailing list