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

George Nassas gnassas at mac.com
Thu Jul 20 13:47:19 UTC 2006


On 19-Jul-06, at 5:08 PM, Fredrik Karlsson wrote:

> 2006-07-19 22:58:32.975 Told to create a NEW database schema, but  
> the database
> ...
> 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...

Hmm, that's odd. Could you do this?

mysql -u mythtv -pmythtv mythconverg
select * from settings where value quit;

the log message about "NEW database" only happens when the version is  
missing/empty but if with a .18 dump the version should be 1083. Is  
this a full backup or did you pick off a subset of tables?

On the other hand, since there seems to be some problem with your  
backup, I'm thinking a better approach might be to capture the  
relevant information from your backup and apply it automatically to a  
fresh db. Run the attached sql against your backup like this:

mysql -s -u mythtv -pmythtv mythconverg < Fredrik.sql >  
import.old.recordings.sh

it creates a bunch of auto-response command lines for  
myth.rebuilddatabase.pl.

Then, remove the backup db and create a fresh one and allow the  
backend to bring it up to the current schema. Then you can use the  
script created above to import your old recordings into the new db.

I haven't tested the generated command lines but if you know how to  
do backups I assume you can fiddle with the sql file to tailor it to  
your environment such as where you have myth.rebuilddb and things  
like that. Any problems you can write me off the list.

- George

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fredrik.sql
Type: application/octet-stream
Size: 669 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20060720/71b5b8da/attachment.obj 
-------------- next part --------------



More information about the mythtv-users mailing list