[mythtv-users] [mythtv] Recovering recording meta data from 0.18 DB dump?

Michael T. Dean mtdean at thirdcontact.com
Thu Jul 20 13:45:02 UTC 2006


On 07/19/2006 05:08 PM, Fredrik Karlsson wrote:

>On 7/19/06, George Nassas <gnassas at mac.com> wrote:
>  
>
>>On 19-Jul-06, at 3:20 AM, Fredrik Karlsson wrote:
>>
>>>MythTV 0.19. So, all I have is meta data from the 0.18.1 release,
>>>which is different in data base structure compared to 0.19 ( or so
>>>...
>>>a) which columns I should fill the data I have into. Specifically,
>>>I need a
>>>...
>>>b) What do I do with the empty columns? Do I have to fill it with
>>>anything?
>>>      
>>>
>>No manual tinkering is needed. Just restore your old DB and when the
>>backend comes up it will automatically upgrade the tables to whatever
>>version you're running. After that you can run contrib/
>>myth.rebuilddatabase.pl which will scan your recordings directory for
>>files which aren't in your database and prompt you for info to
>>restore them.
>>
>>The only remaining problem is you will have entries in your watch
>>recordings list for shows that were present at the time of the backup
>>but were deleted later. You can find them by attempting to play each
>>show and removing the ones that mention "file missing" or whatever.
>>If you have tons of stale recordings it's possible to write some
>>clever shell and sql to list them.
>>
>Thank you for your reply. However, it is not that simple.
>When I do what you suggest, the backend does not start properly and
>spits out this in the log:
>
>2006-07-19 22:58:32.975 Told to create a NEW database schema, but the database
>already has 49 tables.
>If you are sure this is a good mythtv database, verify
>that the settings table has the DBSchemaVer variable.
>
>2006-07-19 22:58:32.976 Database Schema upgrade FAILED, unlocking.
>2006-07-19 22:58:32.977 Couldn't upgrade database to new schema
>
>So, the automatic upgrade approach does not seem to work...
>  
>

The automatic upgrade works, but /only/ from a "complete" database 
restore (i.e. like http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.5 
).  If you want to do a partial restore (as 
http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7 ), the easiest 
solution is to:

    a) do a complete restore (you'll have to drop the existing database 
that Myth couldn't upgrade, first)
    b) run mythtv-setup (to upgrade) and exit mythtv-setup without 
making changes
    c) drop the database
    d) run mc.sql (to create the database)
    e) start mythtv-setup (to create the up-to-date database schema) and 
exit mythtv-setup without making changes
    f) do a partial restore ( 
http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7 )
    g) run mythtv-setup to fix settings
    h) run mythbackend
    i) run mythfrontend

HTH.

Mike


More information about the mythtv-users mailing list