LinHES Forums http://forums.linhes.org/ |
|
Fresh install vs. upgrade? http://forums.linhes.org/viewtopic.php?f=1&t=17867 |
Page 1 of 2 |
Author: | Grant_Edwards [ Sun Feb 10, 2008 3:06 pm ] |
Post subject: | Fresh install vs. upgrade? |
I've finally got my new HD-playback-capable box all assembled, and now I can't decide whether to copy my old drive onto the new drive and do an upgrade or do a fresh install and try to transfer the recorded programs. I'd like to start with a fresh install just so I have a nice clean database without 6 years of old rules and stuff in it. Will it work if I do a fresh install and then copy the recordings and the "recorded" table over to the new box? Will I lose the program info like the synopsis and title? Meanwhile, I have to shop for a replacement fan for the Zallman 8700NT "Ultra Quiet" CPU Cooler. Ultra quiet... Ha! It's the noisiest fan I've tried in _years_. |
Author: | tjc [ Sun Feb 10, 2008 3:55 pm ] |
Post subject: | |
Re: Cooler noise - try dialing it down to the slowest speed with the provided Fanmate II controller. Also I hope you took the time to replace the chipset HSF while you were at it. In my experience that's far for likely to cause a noise problem. ![]() Re: How to setup and do a partial restore see the "Taking advantage of the enhanced backup and restore scripts" thread where I discussed this with a couple people. |
Author: | Grant_Edwards [ Sun Feb 10, 2008 6:01 pm ] |
Post subject: | |
tjc wrote: Re: Cooler noise - try dialing it down to the slowest speed with the provided Fanmate II controller. That model doesn't come with a controller. It's a pwm fan that's speed is controlled by the motherboard. Even at low speeds, it makes a pretty annoying noise. AFAICT, it's a really crappy motor with loud ball bearings. I guess I should have looked specifically for a fan whose balls were actually round and races were smooth. I assumed an "ultra queit" fan wouldn't have such a loud motor in it. Quote: Also I hope you took the time to replace the chipset HSF while you were at it. In my experience that's far for likely to cause a noise problem. ![]() There are no fans in the box except for the Zallman one on the CPU. Quote: Re: How to setup and do a partial restore see the
"Taking advantage of the enhanced backup and restore scripts" thread where I discussed this with a couple people. Thanks. I've read that thread, and I know how to backup and restore files and tables -- that wasn't what I was asking. What I'm trying to find out is: Will just copying the recorded table to the new machine be enough to allow the copied programs to be usable? If it will, I'm going to do a fresh install, and then copy the media files and recorded table to the new box. |
Author: | tjc [ Sun Feb 10, 2008 6:36 pm ] |
Post subject: | |
Grant_Edwards wrote: Will just copying the recorded table to the new machine be enough to allow the copied programs to be usable?
If it will, I'm going to do a fresh install, and then copy the media files and recorded table to the new box. No it won't. DB tables don't work like that, there's a bunch of context information and the like scattered in other files that would be wrong. For example the mysql (versus mythconverg) schema contains information on the layout of the tables and this can differ between MythTV versions. 1) Make a backup. 2) Do the install. 3) Copy the /myth/music, /myth/video, /myth/tv and /myth/backup (with the extracted files) directories over. 4) Extract the data for the tables that you want to restore. (I've answered this same question recently and it's _not_ just the "recorded" table. There are a number of other tables with things like credits, ratings, markup and seek info, ... A quick search for postings by me should provide the complete list.) Do _not_ overwrite the original backup, keep it in case something goes pear shaped. 5) Stop the FE and BE then apply the SQL extracted from the backup. |
Author: | Grant_Edwards [ Sun Feb 10, 2008 9:45 pm ] |
Post subject: | |
tjc wrote: Grant_Edwards wrote: Will just copying the recorded table to the new machine be enough to allow the copied programs to be usable? No it won't. DB tables don't work like that, there's a bunch of context information and the like scattered in other files that would be wrong. For example the mysql (versus mythconverg) schema contains information on the layout of the tables and this can differ between MythTV versions. Yes. I'm aware of that. 1) I know how to use the backup/restore scripts to copy selected tables from one machine to another. 2) The old/new machines are the same exact same version. I'm just trying to find out the minimum set of tables to copy. Quote: 1) Make a backup.
2) Do the install. 3) Copy the /myth/music, /myth/video, /myth/tv and /myth/backup (with the extracted files) directories over. 4) Extract the data for the tables that you want to restore. (I've answered this same question recently and it's _not_ just the "recorded" table. There are a number of other tables with things like credits, ratings, markup and seek info, ... A quick search for postings by me should provide the complete list.) Do _not_ overwrite the original backup, keep it in case something goes pear shaped. 5) Stop the FE and BE then apply the SQL extracted from the backup. Yes, I know. What I'm trying to figure out is "what tables I want to restore". I don't care if there are no markup and seek tables, credits, ratings, etc. for the copied recordings as long as Myth doesn't crash due to lack of that info. I'll do some more searching in the forum to try to find the answer to my question. |
Author: | tjc [ Sun Feb 10, 2008 11:25 pm ] |
Post subject: | |
The markup and seek information in particular is crucial, things just don't work very well if you lose those.. Let me check to see if I can find the list of tables. It may have been a non-public posting... Hmm... I'm not having any luck either. ![]()
people (referenced by recordedcredits) recorded recordedcredits recordedmarkup recordedprogram recordedrating recordedseek If you have your recordings categorized in some way you may also want the "playgroup" table. |
Author: | srcnick [ Mon Feb 11, 2008 8:59 am ] |
Post subject: | |
Hi, I'm in the same situation. I have a new machine and just want to copy my recordings over. So, this is just a request to keep this thread going with a description of what you ended up doing. Thanks, Nick |
Author: | grante [ Mon Feb 11, 2008 10:35 am ] |
Post subject: | |
tjc wrote: The markup and seek information in particular is crucial, things just don't work very well if you lose those.. Let me check to see if I can find the list of tables. It may have been a non-public posting... Hmm... I'm not having any luck either. ![]() I know the feeling. Quote: Alright, time to attempt reconstructing the list...
people (referenced by recordedcredits) recorded recordedcredits recordedmarkup recordedprogram recordedrating recordedseek also want the "playgroup" table. Thanks. That's what I was looking for. Last night I found on a wiki page a list very similar to that except it also included the "record" table. But of course I can't find it now. Since some of those tables are filled with cruft[1], I guess I will have to write some sort of database cleanup program that goes through those tables and deletes anything that isn't referenced (directly or indirectly) by an entry in the "recorded" table. [1] I think I know why there's cruft in those tables. It's almost certainly the fault of my mythviewer program deleting recorded programs without deleting corresponding records in various associated tables. I guess I shouldn't have been so diligent about avoiding classes on database stuff back when I was in school. Just don't tell anybody I'm learning it now... |
Author: | shade4 [ Tue Jul 08, 2008 3:44 am ] |
Post subject: | |
How did you get on with this Grant? |
Author: | cliffsjunk [ Tue Jul 08, 2008 5:15 am ] |
Post subject: | |
Here is a way of using the "Native Archive" to back up all your recordings and all the info from all the associated SQL tables onto a spare hard drive. In the "Main -> Optical Disks -> Archive FIles -> Export Video Files" menu there is a Create Native Archive entry that makes an xml file with all the SQL info from the various tables and also copies the media file from /myth/tv It repeats this for each recording that you specify. When you go to "burn" this you will find that it allows you to put it anywhere in the file system instead of burning a DVD if you want. I choose to put it in /media/tmp where I have my extra hard drive mounted. You will need to "Main -> Optical Disks -> Archive Files -> Find Files to Export -> Select Recordings" first. I presume that you will want to select all of the recordings which can take a couple minutes if you have as many as I do. Do yourself a favor and use the keyboard for this. It sounds like you have enough spare unused storage lying around to copy all your recordings off to an external (or temporary internal) hard drive this way. After a clean install, all you have to do is restore them. The problem (at least in R5F27) is that it only let's you restore one at a time. I wrote a script that will do them all at once. Here it is. Copy this to a file using your favorite editor and 'chmod a+x' on that file. Give it one argument: the absolute path of the directory tree that you want to restore, like /media/tmp if that is where you have the extra drive temporarily mounted. WARNING!: I have not tested this restore script in R5.5 yet!!! I don't have enough hard drives to make a backup of my system right now. Code: #!/bin/bash
homedir=`pwd` # if user passed an arg then use it for the dir to run from # (it must be an absolute path) # else use the current dir rundir=`pwd` if [ -n "$1" ]; then rundir=$1 cd "$rundir" fi echo rundir=\"$rundir\" # due to an apparent error in mytharchivehelper, we must run # mytharchivehelper in the directory that the files are in # so start by going to each directory find . -type d | while read xmldir; do cd "$xmldir" # parse each xml file in that directory ls -1 *.xml 2>/dev/null | while read filename; do echo -n FILENAME= echo $filename #chanid=`echo $filename | sed -ne 's|.*/\([0-9]*\)_20[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\.[A-z][A-z][A-z]\.xml|\1|p'` chanid=`echo $filename | sed -ne 's|\([0-9]*\)_20[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\.[A-z][A-z][A-z]\.xml|\1|p'` echo -n CHANID= echo $chanid if [ -z "$chanid" ]; then echo \(stdout\) Cliff says this is an invalid xml file name for mytharchivehelper echo -n \(stderr\) FILENAME= 1>&2 echo $filename 1>&2 echo \(stderr\) Cliff says this is an invalid xml file name for mytharchivehelper 1>&2 continue fi mytharchivehelper -f $filename $chanid done cd "$rundir" done # not really necessary as this shell will exit # and so our context will be back to where it was cd "$homedir" |
Author: | novellahub [ Tue Jul 08, 2008 8:16 am ] |
Post subject: | |
Here is how I moved from my R5F27 Box to my new machine using R5.5 (Fresh install): ** All steps are using the root user ** Back up the recordings part of the database on the old machine (I did this in the /myth/backup directory on the old machine): Code: mysqldump -c -u mythtv -pmythtv -t mythconverg record recorded \ oldrecorded recordedprogram recordedrating \ recordedmarkup recordedseek > recordings.sql (Remove the \ marks if cutting and pasting to one line in the terminal) Then I used NFS to link both machine so I could copy files across. http://www.knoppmythwiki.org/index.php?page=NFSHowTo On R5F27 machine: Code: /etc/init.d/nfs-common start /etc/init.d/nfs-kernel-server start On new R5.5 machine: Code: /etc/init.d/nfs-common start /etc/init.d/nfs-kernel-server start mkdir /mnt/oldbox mount R5F27mythboxIP:/myth /mnt/oldbox Then I copied the recordings in /myth/tv from old machine to the new: Code: cp -pr /mnt/oldbox/tv/* /myth/tv/ I then copied the backup I made of the database to the new machine: Code: cp -pr /mnt/oldbox/backup/recordings.sql /myth/backup/ Finally, I restored the previous recordings in the database (I ran it from the /myth/backup directory): Code: mysql -f -u mythtv -pmythtv mythconverg < recordings.sql
|
Author: | shade4 [ Fri Jul 11, 2008 8:34 am ] |
Post subject: | |
That procedure worked perfectly for me novellahub, thanks for posting it. The only way that mine differed was I didn't transfer the files to a new machine, but kept them on the same one with the new version. Just extracted the mysql dump to the /myth/backup directory before installing the new version and it all worked a treat. |
Author: | jzigmyth [ Sun Jul 13, 2008 2:13 pm ] |
Post subject: | |
cliffsjunk wrote: WARNING!: I have not tested this restore script in R5.5 yet!!! I don't have enough hard drives to make a backup of my system right now. I tried your script on 5.5 and it seems to work, except I get a Code: WARNING: Couldn't find a 'recordedmarkup' element in XML file warning for each show it retrieves. Was this normal for you in r5f27, too? Other than that, it seems to work fine. Do you think this error will have any hidden repercussions down the road?
And, yes, in 5.5 you still have to unarchive each show one at a time without your script. Thanks! |
Author: | jzigmyth [ Sun Jul 13, 2008 3:13 pm ] |
Post subject: | |
I should expand on what I actually did. I native archived a bunch of recordings from my r5f27 machine and un-archived them on my virgin installed r5.5 machine. That is when the error was generated. They look good and play fine on the 5.5 machine although in the show listings it no longer shows the channel number from which they were recorded. In mythweb it is blank and on the frontend, in the show list, it just displays a four digit number preceded by a # for the channel and the channel icon. All titles and descriptions are in tact. I don't know why that is, maybe because it was recorded on a different machine? |
Author: | tjc [ Sun Jul 13, 2008 3:39 pm ] |
Post subject: | |
More likely because your chanid-s changed for some reason. It should be easy to fix with a bit of SQL-fu or even via the webmin interface. If you look at the channel table you'll see chanid numbers like 1037 for channum 37. Generally it's (sourceid * 1000) + channum (or maybe freqid although channum and freqid usually match). All you need to do is edit the chanid in the recorded table to match the right thousands range in your channel table... |
Page 1 of 2 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |