[mythtv-users] Migration question from 0.24 to 0.25

eric millham emillham at gmail.com
Mon May 21 22:45:04 UTC 2012


On Mon, May 21, 2012 at 11:20 AM, Michael T. Dean
<mtdean at thirdcontact.com>wrote:

> On 05/19/2012 11:14 PM, eric millham wrote:
>
>> Hi, I'm on Ubuntu 12.04.
>>
>> I've bought a spanking new HTPC and want to copy myth from my old HTPC
>> and not mess with the old one till the new one is working 100%
>> So, I figured I would copy over mythconverg and then run myth setup to
>> migrate it.
>> But I get errors because I'm 17 schema levels back:
>>
>> /2012-05-19 20:44:55.360474 C  MythTV database schema is old. Waiting to
>> see if DB is being upgraded./
>> /2012-05-19 20:44:56.362775 I  Current MythTV Schema Version
>> (DBSchemaVer): 1276/
>> /2012-05-19 20:44:57.364872 I  Current MythTV Schema Version
>> (DBSchemaVer): 1276/
>> /2012-05-19 20:44:58.366925 I  Current MythTV Schema Version
>> (DBSchemaVer): 1276/
>> /2012-05-19 20:44:59.369219 I  Current MythTV Schema Version
>> (DBSchemaVer): 1276/
>> /
>> /
>> /This version of MythTV requires an updated database. (schema is 23
>> versions behind)/
>> /
>> /
>> /Please run mythtv-setup or mythbackend to update your database./
>>
>
> Note that 1276 is not a valid schema version for any released version of
> MythTV.  Therefore, assuming you weren't running some random (old)
> unstable/development version of MythTV, you attempted to run MythTV
> (mythtv-setup or mythbackend) and it attempted to update your database, but
> failed after the 1276 update.  That means that the database state is
> undetermined and should never be trusted.
>
> Any time you have a failed database upgrade, you should always restore the
> pre-upgrade backup of the -fixes (I'm assuming 0.24-fixes, which means a
> schema version of 1264) database and then fix whatever issue is preventing
> the upgrade and then upgrade.  Based on what, specifically, the 1277
> upgrade is doing, I'm assuming the only reason it failed is because
> someone/some-broken-script killed mythbackend (or mythtv-setup) while it
> was working on the upgrade.
>
> I highly recommend shutting down all MythTV applications (frontends and
> backends and mythtv-setup) and restoring the 0.24-fixes database backup (
> http://www.mythtv.org/wiki/**Database_Backup_and_Restore#**
> Replacing_an_existing_database<http://www.mythtv.org/wiki/Database_Backup_and_Restore#Replacing_an_existing_database>), then running mythtv-setup to upgrade the database, and waiting patiently
> for it to finish.  (You can view the log output on the console to see it
> progressing through the upgrades.)
>
> Note that if you didn't do a database backup before attempting to upgrade,
> MythTV will attempt to create one for you.  However, it sounds like your
> production system is still running properly, so you could/should just
> create a new backup on it ( http://www.mythtv.org/wiki/**
> Database_Backup_and_Restore<http://www.mythtv.org/wiki/Database_Backup_and_Restore>, where the first 2 (small) sections should help you create the backup).
>
>  /
>> /
>> /Database Host: localhost/
>> /Database Name: mythconverg/
>> /
>> /
>> /2012-05-19 20:45:00.371248 I  Current MythTV Schema Version
>> (DBSchemaVer): 1276/
>> /2012-05-19 20:45:00.371314 C  Timed out waiting./
>> /2012-05-19 20:45:00.371350 E  Not allowed to upgrade the database./
>> /2012-05-19 20:45:00.372423 E  Couldn't upgrade database to new schema/
>>
>
> That happens when you try to upgrade using mythbackend on some host other
> than the master backend or using mythfrontend on any host.
>
>
>  Is there a way to do this?
>>
>
> The above instructions will tell you how to better/more successfully
> upgrade the database.
>
> Once complete, however, it's quite likely that you'll need to use
> mythtv-setup to set your IP address properly on every host.  I'm guessing
> that's why you're getting this error after interrupting the upgrade.
>
>
>
>  I thought of installing 0.24 on the new system and then migrating.
>> But I cannot for the life of me figure out how to get Ubuntu 12.04 to
>> install Myth 0.24.
>>
>> Thanks!
>> Eric
>>
>> P.S. - Once I get past this I'll be back for the latest advice on how to
>> configure VAAPI.
>> I am using a small ITX system and don't want to have to put a nvidia card
>> in there if I can help it.
>> Obsessed with power consumption...
>>
>
> You do realize that an idling GT430 would take about 7-9W, and a
> VDPAU-capable card may use significantly less power than using either
> software decode or even VAAPI decode during playback (as VDPAU does decode
> and presentation).  Therefore, adding a VDPAU-capable card may actually
> decrease overall power usage--especially if...
>
> The /best/ way to save power is to shut down the system when not in use.
>  That extra 9W VDPAU-capable card for, say, 3hrs/day that you're using the
> system = 27Wh/day, which is less than 10kWh/yr (which is about $1.20 at US
> national average electricity price of $0.12/kWh).  Now, let's say that your
> ITX system uses (an impossible) 10W whether idling or at full load without
> that VDPAU-capable card installed.  That 10W * 21hrs/day during which
> you're not using the system = 210Wh/day = ~77kWh/yr wasted.  So, shutting
> down the system when not in use will allow you to get yourself 7
> VDPAU-capable cards (actually, far more, since you won't have a 10W system
> that can run MythTV).  :)
>
> Remember that common sense isn't a good meter for electricity usage, so
> just because adding a new component means another piece using electricity,
> doesn't mean that total electricity usage will be greater (and, definitely
> doesn't mean it will be sufficiently greater to worry about).  :)  Just my
> $0.02.
>
> Mike
> ______________________________**_________________
>
>
Mike, thanks for the reply.
I started over again since I thought I basically did the above. turns out i
did but missed the following error.
Now I see the issue:
May 21 16:35:05 htpc2 mythtv-setup[14525]: I CoreContext
schemawizard.cpp:117 (Compare) Current MythTV Schema Version (DBSchemaVer):
1264
May 21 16:35:09  mythtv-setup[14525]: last message repeated 4 times
May 21 16:35:09 htpc2 mythtv-setup[14525]: C CoreContext
schemawizard.cpp:179 (CompareAndWait) Timed out waiting.
May 21 16:35:09 htpc2 mythtv-setup[14525]: C CoreContext dbutil.cpp:217
(BackupDB) Database backups disabled.  Skipping backup.
May 21 16:35:13 htpc2 mythtv-setup[14525]: C CoreContext dbcheck.cpp:495
(UpgradeTVDatabaseSchema) Newest MythTV Schema Version : 1299
May 21 16:35:13 htpc2 mythtv-setup[14525]: C CoreContext dbcheck.cpp:399
(performActualUpdate) Upgrading to MythTV schema version 1265
....
May 21 16:35:15 htpc2 mythtv-setup[14525]: C CoreContext dbcheck.cpp:399
(performActualUpdate) Upgrading to MythTV schema version 1277
May 21 16:35:15 htpc2 mythtv-setup[14525]: E CoreContext dbcheck.cpp:414
(performActualUpdate) DB Error (Performing database upgrade): #012Query
was:

May 21 16:35:15 htpc2 mythtv-setup[14525]: E CoreContext dbcheck.cpp:509
(UpgradeTVDatabaseSchema) Database Schema upgrade FAILED, unlocking.

May 19 20:30:39 htpc2 mythtv-setup[4122]: E CoreContext dbcheck.cpp:414
(performActualUpdate) DB Error (Performing database upgrade): Query was:
INSERT INTO recordfilter (filterid, description, clause, newruledefault)
  VALUES (0, 'New episode', 'program.previouslyshown = 0', 0); #012Error
was: Driver error was [2/1062]:#012QMYSQL: Unable to execute
query#012Database error was:#012Duplicate entry '0' for key 'PRIMARY'#012
#012new version: 1277

I guess I can figure that out!
I've not looked yet but imagine the Pk changed on this table..
Maybe remove the PK, load data, find the duplicate then reapply the PK. or
eliminate the dup from the production system.
Whatever, no big deal. Hope there aren't a lot of these.

regarding your power comments they're appreciated however my initial
testing shows that the stock mythbuntu install works fine without
installing any graphics drivers. I don't deinterlace since my tv or
receiver handle that fine. I have to look more to understand what exactly
is going on there. but it's good...

Playback is using 5% CPU. not having the extra card seems to work nicely
for me? I use 34 watts total when playing back and 28 at idle.
I bought a hybrid car too so logic/payback don't necessarily apply here. ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20120521/9a387649/attachment.html>


More information about the mythtv-users mailing list