View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 1 post ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Wed Mar 04, 2009 2:37 pm 
Offline
Joined: Sat Apr 01, 2006 10:06 pm
Posts: 31
Location: Vancouver, WA
Had a frightful weekend trying to install R6 preview from R5F27.

Backed off to R5.5 but ran into trouble with the database schema upgrade from R5F27 to R5.5 Here is the error and how I fixed it:

error after upgrade:

Code:
Query was: ALTER TABLE recordedmarkup MODIFY mark MEDIUMINT UNSIGNED NOT NULL DEFAULT 0, MODIFY type TINYINT NO
    T NULL DEFAULT 0;
    Error was: Driver error was [2/1062]:
    QMYSQL3: Unable to execute query
    Database error was:
    Duplicate entry '1121-2008-07-02 20:00:00-5-16777215' for key 1


I found some help in the Mythtv user guide documents installed on the local system, but they were some changes that needed to be made for my situation and for the commands to have the correct syntax.

Importing SQL from old DB

mythtv-doc/mythtv-HOWTO.html#toc23.7

Solution: Do the following as root when there are no scheduled recordings. commercial flaging, transcodes, or playback going on.

Find the mythconverg.sql.gz backup file before the upgrade.
Where <#> is the version of backup file.
Make a copy.
Code:
$ cp mythconverg.sql.gz.<#> mythconverg.sql.gz.<#>.copy


uncompress the mythconverg.sql.gz.<#>
Code:
$ gunzip mythconverg.sql.gz.#


From the mythconverg.sql, import the following records into a transition file restore.sql.

Code:
$ grep "INSERT INTO \`record\` "          mythtvconverg.sql > restore.sql
$ grep "INSERT INTO \`recorded\` "        mythtvconverg.sql >> restore.sql
$ grep "INSERT INTO \`oldrecorded\` "     mythtvconverg.sql >> restore.sql
$ grep "INSERT INTO \`recordedprogram\` " mythtvconverg.sql >> restore.sql
$ grep "INSERT INTO \`recordedrating\` "  mythtvconverg.sql >> restore.sql
$ grep "INSERT INTO \`recordedseek\` "    mythtvconverg.sql >> restore.sql


Run Backup Knoppmyth from the Frontend to save the DB state. Stop the Front and Backend


Import restore.sql into current mythconverg database(run as root)

Code:
$ mysql -u mythtv -p mythconverg < restore.sql
Password: mythtv


Restart the Backend

Check for errors in:

/var/log/mythtv/mythbackend.log

Restart the Frontend
Check to see recordings are available in the Frontend interface

When you are satisfied that the restore went well, do another KnoppMyth backup from the Frontend


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu