View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 17 posts ] 
Go to page 1, 2  Next

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun Feb 10, 2008 3:06 pm 
Offline
Joined: Fri Feb 08, 2008 9:19 pm
Posts: 70
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_.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 10, 2008 3:55 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
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. ;-) See - http://knoppmyth.net/phpBB2/viewtopic.php?t=17677

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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 10, 2008 6:01 pm 
Offline
Joined: Fri Feb 08, 2008 9:19 pm
Posts: 70
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 10, 2008 6:36 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 10, 2008 9:45 pm 
Offline
Joined: Fri Feb 08, 2008 9:19 pm
Posts: 70
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 10, 2008 11:25 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
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. :roll: Sigh. It's been one of those days. Alright, time to attempt reconstructing the list...

    oldrecorded
    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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 11, 2008 8:59 am 
Offline
Joined: Sat Feb 18, 2006 1:52 pm
Posts: 4
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 11, 2008 10:35 am 
Offline
Joined: Mon Jun 27, 2005 4:42 pm
Posts: 321
Location: Minneapolis, Minnesota, USA
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. :roll: Sigh. It's been one of those days.

I know the feeling.
Quote:
Alright, time to attempt reconstructing the list...
    oldrecorded
    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.

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...

_________________
Grant


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 08, 2008 3:44 am 
Offline
Joined: Mon Feb 13, 2006 7:10 pm
Posts: 36
Location: Australia
How did you get on with this Grant?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 08, 2008 5:15 am 
Offline
Joined: Fri Sep 15, 2006 12:16 pm
Posts: 292
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"


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 08, 2008 8:16 am 
Offline
Joined: Wed Jan 25, 2006 1:03 pm
Posts: 240
Location: Shakopee, MN USA
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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 11, 2008 8:34 am 
Offline
Joined: Mon Feb 13, 2006 7:10 pm
Posts: 36
Location: Australia
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 13, 2008 2:13 pm 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
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!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 13, 2008 3:13 pm 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
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?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 13, 2008 3:39 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
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...


Top
 Profile  
 

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



All times are UTC - 6 hours




Who is online

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