[mythtv-users] Re: Clean 0.15 install, what should I save from the old DB?

Bruce Markey bjm at lvcm.com
Sat Jun 5 21:21:32 EDT 2004


Aleaxander wrote:
> I'm trying to restore information from my 0.14 database into a clean 
> install of 0.15 (Fedora Core 1).  Searching the list archives, I found 
> the following information on how to do this:
> 
> ----
> Restore the information from "record' (the titles you've chosen
> to record), 'recorded' (the descriptive info for your recording),
> 'oldrecorded' (for finding duplicates that you've recorded previously)
> and 'recordedmarkup' (keyframe seek info, commercial skipping, etc).
> 
> grep "INSERT INTO record " mythtv_backup.sql > restore.sql
> grep "INSERT INTO recorded " mythtv_backup.sql >> restore.sql
> grep "INSERT INTO oldrecorded " mythtv_backup.sql >> restore.sql
> grep "INSERT INTO recordedmarkup " mythtv_backup.sql >> restore.sql
> 
> Note the space after the table name and the ">>" to append to the
> file for all but the first grep. "recordedmarkup" is huge and
> may be hundreds of thousands of lines if you had lots of hours
> of recordings.
> 
> If your hostname has changed, bring up restore.sql in an editor
> to search and replace your old hostname with the new one being
> careful to not replace if your old hostname appears in a show's title or 
> description .
> 
> Once your file is ready to go:
> 
> $ mysql -u mythtv -pmythtv mythconverg < restore.sql
> ----
> 
> Everything looked good until I did the last step, and then received the 
> following error:
> 
> ERROR 1054 at line 1: Unknown column 'recorddups' in 'field list'
> 
> Looking at a backup of the 0.15 mythconverg database I made before I 
> started trying to restore information from the 0.14 database I see that 
> there is no recorddups field present.  Anyone have any idea what I am 
> doing wrong or suggestions on how I can proceed?

That column was dropped and replaced with two other columns.

  ALTER TABLE record ADD COLUMN recorddups INT DEFAULT 0 NOT NULL;

Run the restore command again then:

  UPDATE record SET dupmethod = 1 WHERE recorddups = 2;
  UPDATE record SET dupin = 2 WHERE recorddups = 1;
  ALTER TABLE record DROP COLUMN recorddups;

--  bjm


More information about the mythtv-users mailing list