View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 24 posts ] 
Go to page Previous  1, 2

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Tue Jun 30, 2015 10:33 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
It sounds like you need to try a partial restore and see if you can just keep the bare minimum. Using the built in option you don't have to go digging through MySQL hell. https://www.mythtv.org/wiki/Database_Ba ... f_a_backup
I wouldn't bother with setting up tuner cards until after you get to LinHES. All those setting get changed anyway. In the VM how are you even seeing a tuner card?
Thank God all your "fun" can be limited to the comfort of a VM and not your production box.

_________________
My System


Top
 Profile  
 
PostPosted: Wed Jul 01, 2015 6:19 am 
Offline
Joined: Sat Dec 03, 2005 5:59 pm
Posts: 111
Location: Sydney, Australia
bgrant3406 wrote:
Rather than trying to migrate the two known bad files, would it be easier to re-enter the data?
Basically take the newer version of Knoppmyth and go through the mythtv setup to redefine your capture cards and redo the settings (save a "gold" backup of the empty database with the new settings/capture card info).

Good point - especially as those are two tables that are easy to re-create. Done!

bgrant3406 wrote:
Once you have that, then import the other tables into the DB and test.

Ah - this is where I realised that I don't know how to do that... would I need to upgrade each table's schema manually, before importing into R5B7? Or is there a sneaky way of instructing mythbackup or mythrestore to only parse specific tables?

mattbatt wrote:
It sounds like you need to try a partial restore and see if you can just keep the bare minimum. Using the built in option you don't have to go digging through MySQL hell. https://www.mythtv.org/wiki/Database_Ba ... f_a_backup

Hmmm, the wiki sure makes it sound like hell nonetheless! I hope there is another way...

mattbatt wrote:
I wouldn't bother with setting up tuner cards until after you get to LinHES. All those setting get changed anyway. In the VM how are you even seeing a tuner card?

Good question - fortunately I'm using an external USB one (Hauppauge WinTV PVR USB2) as all my recordings are made off cable, not off air. Windows 7 doesn't recognise the device, but it still works with the VM :-)

mattbatt wrote:
Thank God all your "fun" can be limited to the comfort of a VM and not your production box.

Yes and that was a great suggestion, thank you - wouldn't have a hope of doing any of this otherwise!


Top
 Profile  
 
PostPosted: Wed Jul 01, 2015 9:32 am 
Offline
Joined: Tue Jul 01, 2014 6:49 am
Posts: 92
if you go to the Mythdora to LinHES write up http://forums.linhes.org/viewtopic.php?f=22&t=24017&p=139520&hilit=Mythdora#p139520 and find the section:

Quote:
Next dump tables to files
dump file:
(on a Separate PC open a terminal via the web-admin or on the LinHES MBE via Alt-x)


That is how I dumped the tables from the database and inserted them into the new database.

I would skip recordedmarkup and recordedseek since you can rebuild those after the fact. If you have done a bunch of custom editing, then you probably want to try and migrate recordedmarkup, if just standard commercial detection, then I would run a job to redo rebuild seek table and commercial detection once you have finished the upgrade.

The mysql stuff was pretty straight forward, this was my first foray into messing around with this, so it was a little scary at first, but after you’ve done it successfully then it’s not too bad. Luckily you are working in a VM environment and can restart at will.

I can’t help you with the schema changes, but it would be best to get to the closest version to what you have and start the upgrade process. Once you have the tables migrated into the database, you can let knoppmyth/LinHES/mythtv take care of the schema upgrades with each new version you upgrade to. You might review the mythtv release notes for the various versions to see if there any gotcha's, here is a link to the 0.19 notes, where I believe you are or the next upgrade will take you: https://www.mythtv.org/wiki/Release_Notes_-_0.19 There are hyperlinks in each that let you can jump to each previous release so you can review any major changes. Don't forget to review the KnoppMyth and LinHES upgrade notes as well, while Mythtv may let you jump two versions (or more), KnoppMyth and LinHES may not.

One thing I would strongly suggest is that after you migrate the tables, you create a “gold” backup and run tests on the system, migrate a few recording files, setup your tuners and check to see what is missing or broken, you may need to go and get other tables and migrate them. If so, reload from your “gold” db backup and import the additional table(s), then retest. I would then flush the system, load the "gold" backup, import the other table and recreate a gold backup. My thought is that you don’t want to get all the way to LinHES 8.x and find that something important to your recordings is missing and can’t be rebuilt. Once you have verified that you have all the necessary tables, I would then use the final gold backup to migrate with. When I got to LinHES 8.x I would build out the system fully and test again.


Top
 Profile  
 
PostPosted: Wed Jul 01, 2015 9:27 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
It's really not as bad as the Wiki makes it out to be. What you keep is the record of every recording you have ever made wanted to make or want to make in the future. What you lose are things that are replaceable, Audio video setup settings, tuner card settings, channel line-up, etc.
Here is where the partial restore saved my bacon
viewtopic.php?f=21&t=22822&p=135624

_________________
My System


Top
 Profile  
 
PostPosted: Thu Jul 02, 2015 5:26 am 
Offline
Joined: Tue Jul 01, 2014 6:49 am
Posts: 92
mattbatt wrote:
It's really not as bad as the Wiki makes it out to be. What you keep is the record of every recording you have ever made wanted to make or want to make in the future. What you lose are things that are replaceable, Audio video setup settings, tuner card settings, channel line-up, etc.
Here is where the partial restore saved my bacon
viewtopic.php?f=21&t=22822&p=135624


Yeah, it's funny I had no luck using the partial restore (believe me, I tried...multiple times) so i had to go the long way around. Probably didn't work since I was coming from Mythdora to LinHES. Interestingly what I did seemed to be a manual version of the partial restore and worked for me.


Top
 Profile  
 
PostPosted: Thu Jul 02, 2015 7:24 am 
Offline
Joined: Sat Dec 03, 2005 5:59 pm
Posts: 111
Location: Sydney, Australia
Thanks a lot guys! It will take me a while to go through all of that, and no doubt will have some more questions as I progress (hopefully!) through it :)


Top
 Profile  
 
PostPosted: Sat Jul 04, 2015 11:47 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
What did we learn??? Dont' fall too far behind on our upgrades or else you get Billy Madison syndrome and have to take all 12 grades in a month.

_________________
My System


Top
 Profile  
 
PostPosted: Tue Jul 07, 2015 5:01 am 
Offline
Joined: Sat Dec 03, 2005 5:59 pm
Posts: 111
Location: Sydney, Australia
Yes - and what's even scarier: where did the last 10 years go so quickly??


Top
 Profile  
 
PostPosted: Thu Aug 06, 2015 6:06 am 
Offline
Joined: Sat Dec 03, 2005 5:59 pm
Posts: 111
Location: Sydney, Australia
Well I have been playing around with this, and it's good news... thanks to your help, plus some other help and - ironically - some help from a younger version of myself here, 9 years ago http://forums.linhes.org/viewtopic.php?f=6&t=6748&p=44605 I think the database issue is licked.
First I tried the Partial Upgrade method, but it failed. But my assumption that there must be something odd about my current 'live' R5A30.2 database that's crashing the mythrestore when it tries to upgrade, was correct. Here's what I did in the end.
First I did this for my 'live' database, then again for a newly-installed 'pristine' database:
Code:
mysqldump -h localhost -u root -p --no-data mythconverg > mythconverg.log

That showed the structures of each table in the database, and I compared the two log files - and found out that several tables in my live database had extra columns in them that weren't in the pristine version.
But fortunately all those extra columns DO exist in R5B7 (plus a few more as well). Heck only knows how my database got 'partially upgraded' but I can only assume this is something that must have happened years ago, when I was first messing around with this, but eventually gave up!

I assume that the reason why my live R5A30.2 continues to function, even though several tables contain extra columns, is because the extra columns simply get ignored.
But conversely, I assume that the reason why the R5A to R5B upgrade always failed is because even though those extra columns do exist in R5B7, the upgrade script would not be expecting to see them in the R5A30.2 source data, so it probably chokes on them?

Next step, I exported R5A30.2:
Code:
mysqldump mythconverg -c > mythconverg.csv

oldrecorded was one of the tables with extra columns, so I then ran:
Code:
grep "INSERT INTO \`oldrecorded\` " mythconverg.csv > oldrecorded.csv

And finally imported that table into a pristine R5B7:
Code:
mysql mythconverg < oldrecorded.csv

And voila, it imported just fine!
As discussed earlier, I think the only tables I really need to keep are:
channel (because I have 114 of them, and setting them all up again would be a pain)
oldrecorded
oldprogram
record
recorded
recordedmarkup
recordedprogram
recordedrating
Let me know if you can think of any others? (R5A/5B have no recordedseek table).

I'm pleased to say that all of those imported nicely into R5B7, resulting in a working R5B7 at last.
While I haven't tried it yet, I have no reason to doubt that R5B7's database should then upgrade OK into the next version, and the next - so I plan to sequentially upgrade the database by installing VMs of each version as discussed earlier.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ] 
Go to page Previous  1, 2



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 16 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