Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

MythTV Disaster Recovery

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


jrw3319 at gmail

Nov 16, 2009, 5:03 PM

Post #1 of 4 (502 views)
Permalink
MythTV Disaster Recovery

I'm almost embarrassed to post this because of some stupidity on my part but
here goes... Over the weekend I experienced a somewhat sudden and what looks
to be an unrecoverable hard drive crash on my boot / root drive on my MythTV
back-end system. I had a fairly recent database back-up from when I
upgraded my system from 0.21 to 0.22 but unfortunately (and foolishly) I
left the backup not only on the back-end system, but also on the root drive
that crashed. I dug around my other systems and I did manage to find a
previous database backup from earlier in the year when I did a hardware
upgrade. Fortunately (I hope) I did not lose any of my active recordings
because they were being saved to either another local drive or an NFS mount
on my NAS server.

So, now I am trying to figure out how to proceed. My first question is is
it worth it to even attempt to use the database backup from earlier in the
year? The biggest thing I dread is re-setting up my channel lineups. I
haven't done much with the channel setup since 0.20 / early 0.21 days, but I
remember it to be a fairly time-consuming, very much manual process. Have
things improved in this area so that it would now be a trivial / painless
process? I'm particularly interested in QAM channel scanning for the HDHR
and pcHD3000 tuners.

Second, once I have MythTV set-up again is there any way for me to get the
recordings that I still have back into the database? I did a search of the
mailing list archives and came up with a few older hits mentioning the
myth.rebuilddatabase.pl script, but at least one reply seemed to indicate
that it didn't really update the database.

Any help with these questions and/or any other constructive suggestions
would be appreciated.

Thanks,
John


newbury at mandamus

Nov 16, 2009, 6:10 PM

Post #2 of 4 (479 views)
Permalink
Re: MythTV Disaster Recovery [In reply to]

John Welch wrote:
> I'm almost embarrassed to post this because of some stupidity on my part
> but here goes... Over the weekend I experienced a somewhat sudden and
> what looks to be an unrecoverable hard drive crash on my boot / root
> drive on my MythTV back-end system. I had a fairly recent database
> back-up from when I upgraded my system from 0.21 to 0.22 but
> unfortunately (and foolishly) I left the backup not only on the back-end
> system, but also on the root drive that crashed. I dug around my other
> systems and I did manage to find a previous database backup from earlier
> in the year when I did a hardware upgrade. Fortunately (I hope) I did
> not lose any of my active recordings because they were being saved to
> either another local drive or an NFS mount on my NAS server.

> So, now I am trying to figure out how to proceed. My first question is
> is it worth it to even attempt to use the database backup from earlier
> in the year? The biggest thing I dread is re-setting up my channel
> lineups. I haven't done much with the channel setup since 0.20 / early
> 0.21 days, but I remember it to be a fairly time-consuming, very much
> manual process. Have things improved in this area so that it would now
> be a trivial / painless process? I'm particularly interested in QAM
> channel scanning for the HDHR and pcHD3000 tuners.

If your upgrade to .22 was (relatively) painless then the old database
should have the same channel setup/structure. So you should be able to
skip that. Just re-install myth, stop mysqld and copy over the old
database. On restart, myth should upgrade the schema.
You will end up with a database that does not know anything about the
last year.

> Second, once I have MythTV set-up again is there any way for me to get
> the recordings that I still have back into the database? I did a search
> of the mailing list archives and came up with a few older hits
> mentioning the myth.rebuilddatabase.pl <http://myth.rebuilddatabase.pl>
> script, but at least one reply seemed to indicate that it didn't really
> update the database.

Myth.rebuilddatabase.pl does work to re-add the video files into the
database. However, it does not 'know' what the files represent. It uses
the channel+date+time file name. *IF* you know what the file represents,
you can enter the info. (Or you can do that later using phpMyAdmin while
looking at the files to determine what each is.
There is one problem with the myth.rebuilddatabase script. It leaves the
file *size* as zero bytes, so myth chokes.
So in addition you need to run this little scriptlet, one file at a time
using the filename on the command line, as in:

myth.rebuild.filesize.sh 1061_20090416215800.mpg

********** myth.rebuild.filesize.sh *******
# Taken from an anonymous post on the mythtv wiki.
# Thanks due to whoever you are, not Geoff Newbury!

SIZE=`ls -l $1 | awk '{print $5}'`
echo " File $1 is $SIZE bytes"

mysql -u mythtv -pmythtv mythconverg << EOF
update recorded set filesize = '$SIZE' where basename = '$1';
EOF
**********************

> Any help with these questions and/or any other constructive suggestions
> would be appreciated.
In future, run a cron to backup the database to a different drive!

Geoff



--
Please let me know if anything I say offends you.
I may wish to offend you again in the future.

Tux says: "Be regular. Eat cron flakes."
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


lists at manor-farm

Nov 16, 2009, 11:13 PM

Post #3 of 4 (471 views)
Permalink
Re: MythTV Disaster Recovery [In reply to]

John Welch wrote:
> I'm almost embarrassed to post this because of some stupidity on my part
> but here goes... Over the weekend I experienced a somewhat sudden and
> what looks to be an unrecoverable hard drive crash on my boot / root
> drive on my MythTV back-end system. I had a fairly recent database
> back-up from when I upgraded my system from 0.21 to 0.22 but
> unfortunately (and foolishly) I left the backup not only on the back-end
> system, but also on the root drive that crashed. I dug around my other
> systems and I did manage to find a previous database backup from earlier
> in the year when I did a hardware upgrade. Fortunately (I hope) I did
> not lose any of my active recordings because they were being saved to
> either another local drive or an NFS mount on my NAS server.
>
> So, now I am trying to figure out how to proceed. My first question is
> is it worth it to even attempt to use the database backup from earlier
> in the year? The biggest thing I dread is re-setting up my channel
> lineups. I haven't done much with the channel setup since 0.20 / early
> 0.21 days, but I remember it to be a fairly time-consuming, very much
> manual process. Have things improved in this area so that it would now
> be a trivial / painless process? I'm particularly interested in QAM
> channel scanning for the HDHR and pcHD3000 tuners.
>
Just a thought, but have you tried booting from a Live CD and trying to
mount the crashed disk. You may be able to read /var/lib/mysql.

Ian.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


jrw3319 at gmail

Nov 17, 2009, 5:25 AM

Post #4 of 4 (454 views)
Permalink
Re: MythTV Disaster Recovery [In reply to]

On Tue, Nov 17, 2009 at 2:13 AM, Ian Barton <lists [at] manor-farm> wrote:

> John Welch wrote:
>
>> I'm almost embarrassed to post this because of some stupidity on my part
>> but here goes... Over the weekend I experienced a somewhat sudden and what
>> looks to be an unrecoverable hard drive crash on my boot / root drive on my
>> MythTV back-end system. I had a fairly recent database back-up from when I
>> upgraded my system from 0.21 to 0.22 but unfortunately (and foolishly) I
>> left the backup not only on the back-end system, but also on the root drive
>> that crashed. I dug around my other systems and I did manage to find a
>> previous database backup from earlier in the year when I did a hardware
>> upgrade. Fortunately (I hope) I did not lose any of my active recordings
>> because they were being saved to either another local drive or an NFS mount
>> on my NAS server.
>>
>> So, now I am trying to figure out how to proceed. My first question is is
>> it worth it to even attempt to use the database backup from earlier in the
>> year? The biggest thing I dread is re-setting up my channel lineups. I
>> haven't done much with the channel setup since 0.20 / early 0.21 days, but I
>> remember it to be a fairly time-consuming, very much manual process. Have
>> things improved in this area so that it would now be a trivial / painless
>> process? I'm particularly interested in QAM channel scanning for the HDHR
>> and pcHD3000 tuners.
>>
>> Just a thought, but have you tried booting from a Live CD and trying to
> mount the crashed disk. You may be able to read /var/lib/mysql.
>
> Ian.
>
>
Thanks for the responses so far. Hoping to get my new drive today, and
will be starting the rebuild process when it arrives. I did try booting
from a live USB drive but the BIOS on the system isn't even recognizing the
drive anymore. Also tried moving the drive to another system and booting
from the live USB drive there, but on this system I can't even get past POST
with the drive connected. Still might try a few more things, but that's why
I said "what looks to be an unrecoverable hard drive crash" in my original
post.

Definitely plan on adding scheduled backups to another system / drive.

Thanks again,
John

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.