[mythtv-users] Couple of questions on migration

Mike Perkins mikep at randomtraveller.org.uk
Tue Jul 18 22:01:40 UTC 2017


On 18/07/17 20:56, Michael T. Dean wrote:
> On 07/18/2017 02:44 PM, DryHeat122 . wrote:
>> I am trying to migrate an old (12.04) Mythbuntu mythconverg to a new (16.04) setup. I have two
>> questions about this.
>>
>> First should I restore the database after installing the new mythbunto but before running
>> mythtv-setup, or should I run setup first?
>
> You need to restore the database before running *any* MythTV application--including mythtv-setup and
> mythbackend.  Otherwise, they will populate the database schema, so you won't have the (required)
> empty database for the restore.
>
> https://www.mythtv.org/wiki/Database_Backup_and_Restore#Database_Restore
>
> If, for any reason, you have tables in your schema, you can always restore with
>
> --drop_database --create_database
>
> to get rid of (permanently delete--so make sure that's what you want to do) the existing
> database/schema/tables/data and create a new, empty database into which the restore will work.
>
> https://www.mythtv.org/wiki/Database_Backup_and_Restore#Replacing_an_existing_database
>
>> Second, though mysqlcheck found no problems with the old database, the backup file appears to have
>> some corrupted data in the recordedseek table.  There are two insert statements, one with what
>> look like valid values, i.e., with the form
>>
>> (2025,'2016-08-01 14:00:00',126,5828752,9).
>>
>> But there is a second insert statement that is fine for hundreds of values then starts including
>> non alphanumeric characters like:
>>
>> (3008,'2017-04-#1h;0:00:0 'l9144:9
0876305648,9),(3200-'2017-04-11$2 800:00',1 4�=7<4x0020;2 0�9)
>>
>> I'm sure this is not right and that mysql will choke on them.  I'm wondering what are the
>> consequences of deleting these invalid values, i.e. ending the insert statement at the last valid
>> value.  I think but am not sure that this table tracks commercial flagging so would I only lose
>> commercial flagging for the associated programs?
>>
>
> Chances are if there's a problem with them, MySQL will complain and either the restore will proceed
> and ignore the bad records or the restore will fail.  If it fails, you can then try editing the
> backup and then re-restore using the
>
> --drop_database --create_database
>
> arguments, as above.
>
If the database is that old, could this be because of the change of character set? I don't remember 
when that happened, but I do remember it caused trouble like this before.

-- 

Mike Perkins



More information about the mythtv-users mailing list