View unanswered posts    View active topics

All times are UTC - 6 hours





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

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject:
PostPosted: Sun May 15, 2011 12:34 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Hmmm... Maybe. Check the record counts in the tables first. e.g. -
Code:
SELECT COUNT(*) FROM channel;

If you drop all the sources and tuners and then one it should get ID 1 and line up with your old channels. The channel # really isn't a big deal though just as long as the sourceid lines up.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 15, 2011 12:41 pm 
Offline
Joined: Tue Apr 18, 2006 3:42 pm
Posts: 46
Location: Central PA
Just did that and here are the results:

Code:
mysql> SELECT COUNT(*) FROM channel;
+----------+
| COUNT(*) |
+----------+
|        1 |
+----------+
1 row in set (0.00 sec)


Remember, like I just stated this test system actually doesn't have any real tuners and the file input for the fake tuner is set up as some random channel number, which would explain seeing the 1 result here..

_________________
---------
Amos B.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 15, 2011 12:42 pm 
Offline
Joined: Tue Apr 18, 2006 3:42 pm
Posts: 46
Location: Central PA
Also aren't the newer LinHES versions starting the tuners at ID 65 not 1?

_________________
---------
Amos B.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 15, 2011 12:47 pm 
Offline
Joined: Tue Apr 18, 2006 3:42 pm
Posts: 46
Location: Central PA
Ok, I'm chomping at the bit

Let me see if I have the procedure ready in my mind. here are the steps:

    Run "mythbackup" and rsync the latest changes across network (this has only been taking about 2 min most of the day)

    Shutdown Backend and pull drive, install new drive(s) and LinHES on the smaller drive.

    Mount Larger drive temporarily as say /mnt/tb

    Copy backup files from /mnt/tb/myth/backup/ to the smaller drive.

    Run the script you just gave giving the backup directory and file as arguments.

    Unmount /myth, and remount the /mnt/tb as /myth (editing fstab to match the change.

    Enjoy the backend being up and running.

    Set up my frontend and diskless as outlined in another thread.

_________________
---------
Amos B.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 15, 2011 1:14 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
For record counts 1 is too low, unless you've only got one channel. It sounds like the channel.sql didn't work for some reason. Take a look at the .sql file and make sure that there is more than one set of values.

The 65 for tuner and source ids is an artifact of some setup scripts. If you delete all and re-add it will reset the starting point to 1.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 15, 2011 1:16 pm 
Offline
Joined: Tue Apr 18, 2006 3:42 pm
Posts: 46
Location: Central PA
Ok, I just started the install of 6.04 on the old hardware.

Is it going to muck up the system to much if this isn't worked out right away?

_________________
---------
Amos B.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 15, 2011 2:00 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
To some extent, but given the original backup and the scripts, we can keep tweaking and rerunning until it's right.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 15, 2011 7:32 pm 
Offline
Joined: Tue Apr 18, 2006 3:42 pm
Posts: 46
Location: Central PA
Will it matter if I record things between now and when we tweak again?

_________________
---------
Amos B.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 16, 2011 7:25 am 
Offline
Joined: Tue Apr 18, 2006 3:42 pm
Posts: 46
Location: Central PA
Here's where I stand after several hours last night:

Installed 6.04 and used above scripts to bring in recording data.

Swapped mount points and Myth was still complaining that files weren't there, looked at drive and realized rsync hadn't dropped the contents of /myth/ into the root of the drive, but into a myth folder. Grr.. Started an rsync to bring the contents back to the root of the drive. Then realized that the permissions were messed up anyway (100, policykit), so folowed instructions on another thread to repair them after the rsync was done. (I think had I realized the problem early enough I'd have just done a move of the files rather than an rsync).

So, after that is all done, my recordings are playing. Set up my diskless frontend (see another thread by me) and tested and it seems to be working for all previous recordings.

The bad.
    Thumbnails in MythWeb are missing for recordings.
    Channel information in Myth is showing as say #1014 #1014
    Channel information in MythWeb is missing.
    Scheduled recordings/Recording schedules gone, but I can rebuild (and have for the most part).
    My Video's haven't showed up (not recordings, avi's etc I have placed on the system)


I think that is all for now, or all that I can think of at the moment.

_________________
---------
Amos B.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 16, 2011 7:58 am 
Offline
Joined: Tue Apr 18, 2006 3:42 pm
Posts: 46
Location: Central PA
Ok, after a quick test with MySQL Query Browser, I took a look at the Channel tables and noticed the chanid and sourceid for all my channels etc were set to sourcd 65 and chanid 65xxx. After editing one of the rows to be sourceid 1 and chanid 1xxx MythWeb was showing the correct channel information for all recordings on that channel.

Woot.

So, 46 field edit's later Mythweb is showing the channel information correctly for most of my recordings (there are some channels I no longer have access too as we were downgraded some time ago, so I'll probably either deal with not having the information for those recordings (not really important to me))

I am at work, so I dont know if the channel information is showing up correctly in Myth, but my guess is it is.

So, that leaves me with just 2 remaining issues:

Thumbnails in MythWeb for recordings

My video's not showing up.

_________________
---------
Amos B.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 16, 2011 8:50 am 
Offline
Joined: Tue Apr 18, 2006 3:42 pm
Posts: 46
Location: Central PA
Ok, after a little more MySQL massaging I have the MythWeb thumbnails showing up correctly.

Turns out (And I should have known better), I did the "Dont' do this" and changed my hostname between the old and new install, so the "hostname" column in the recorded table was still pointing to the old hostname. Some Mysql replacement and that is all taken care of.

_________________
---------
Amos B.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 16, 2011 7:27 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Glad to hear that you got most of that sorted out.

For the videos you most likely just need to rescan the directory. Although there are some known issues with the videos and the mythweb interface (it requires storage groups but that causes other trouble).


Top
 Profile  
 
PostPosted: Mon Mar 04, 2013 1:55 pm 
Offline
Joined: Tue Jan 23, 2007 1:38 pm
Posts: 240
Location: Sweden
Thanks for this tjc!
I am currently in the process of replacing my aging R5.5 system and have new hardware setup with R8 on it. The script does its job well as far as I can tell. A new hard disk is on its way to carry the files themselves. Meanwhile, I am making sure that the database conversion will go smoothly.
There does seem to be an issue though regarding code page use. It appears that mythtv changed its default code page of latin1 to utf8 at some point in time. A change that will benefit humankind, but needs to be done correctly. I have followed numerous guides of how to convert the data in the recorded_program_data.sql, but to no avail. It turned out that the R8 MySQL was set up inconsistently, mixing latin1 and utf8!
Code:
mysql
mysql> show variables like 'char%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8                       |
| character_set_connection | utf8                       |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | utf8                       |
| character_set_server     | utf8                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+

Specifically, my character_set_client and character_set_connection were latin1. Unless everything everywhere speaks utf8, there will only be a mess.
I edited /etc/mysql/my.cnf and inserted
Code:
default-character-set = utf8
in the [client] section, restarted MySQL and made the above check to make sure everything now was utf8.

After that, I followed this http://www.bdunagan.com/2011/09/29/converting-mysql-from-latin1-to-utf8/ guide loosely:
Dump the old database as latin1, because ironically, mysqldump defaults to utf8. This step was critical to finally getting it straight!
Code:
/usr/bin/mysqldump --default-character-set=latin1 -u mythtv -pmythtv mythconverg -c -f > /myth/backup/mythconverglatin1.sql

Run tjc:s script
Rewrite the recorded_program_data.sql to say 'utf8' in all places. Use an editor to find "latin1" and change that to "utf8". There should be only one.
Pipe the converted database dump into MySQL on the new system:
Code:
mysql  -f --default-character-set=utf8 mythconverg < recorded_program_data.sql

I had to throw in an -f for force or it would get stuck with a double name entry. Don't know if that really is an error that needs taking care of, or just the same actor appearing in two shows.
Voilà - I had my Swedish å, ä and ö back, as well as some other special characters I had not thought of - instead of lengthy garbage instead of those characters.

I'm not a MySQL wizard, just googled these things up. Hopefully, it will help someone else with code page trouble.

/Chris

_________________
LinHES R8.2
BE: AMD64X4, 4GB, Hauppauge usb tuners
FE1: Gigabyte F2A85X-UP4, nVidia GT640
FE2: Gigabyte GA-MA69GM-S2H, AthlonX2 4850E 2.5 GHz, 1GB, ASUS GEFORCE 7200GS 256MB
FE3: Asus Chromebox CN60


Top
 Profile  
 

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



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 1 guest


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:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu