View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 6 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun Feb 05, 2012 10:15 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
Tonight my frontend/backend had a hard lockup and I had to do a Hard Reset. I was watch the commercials from the Super Bowl and was skipping ahead a lot while commercial flagging was running.
Of Course the database broke!!!!! it was still recording The Voice but that's all it had in the upcoming recordings. So I pulled up mythweb went to the tools section/ database and there they were: "Optimize Tables" "Repair Tables" and "Extended Check". I waited for a commercial stopped the recording and ran the scripts.
My Database is repaired and everything is right with the world again.
Just a question can you run those scripts while something is recording?

Thank you again to whichever MythWeb guys put that in there.

_________________
My System


Top
 Profile  
 
PostPosted: Mon Feb 06, 2012 8:31 pm 
Offline
Joined: Mon Dec 24, 2007 9:47 am
Posts: 535
Location: Ottawa, Canada
mattbatt wrote:
Just a question can you run those scripts while something is recording?

I would think so since a recording really only alters the database when it starts and ends. REPAIR is really just a mysql command. The only caveat is if the server or mysql crashes during an actual repair. If it does you need to run repair again before any other app accesses the database or corruption could result.

Those links activate the command line level of those commands. There should be a cron job that runs the optimize/repair every night. I think it calls something like "optimize_mythdb".


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 07, 2012 12:27 pm 
Offline
Joined: Tue Sep 12, 2006 6:03 am
Posts: 210
Location: Roseville, MI
From the MythTv wiki:
Quote:
Note that each table in the database is locked while the repair and optimize is performed. Therefore, the script should only be run when Myth is otherwise idle. Monthly execution may be sufficient. Daily may be overkill but ought to be harmless if the system would not otherwise be busy. Be sure that you have an appropriate backup strategy in place, as well (http://www.mythtv.org/wiki/User_Manual:Periodic_Maintenance#Optimize_the_Database)
.
I just set this up in my cron (crontab -e) the other day (runs every day at 4am).
Code:
00 04 * * * root /usr/LH/bin/optimize_mythdb.py > /var/log/opt_mysql.log 2>&1

Thinking about working on something fancier, log wise, but have not got around to it yet.

_________________
-Roseville, Michigan USA
LinHES R8: FE/BE, FE (x2)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 07, 2012 5:57 pm 
Offline
Joined: Mon Dec 24, 2007 9:47 am
Posts: 535
Location: Ottawa, Canada
spideyk21 wrote:
I just set this up in my cron (crontab -e) the other day (runs every day at 4am).

Don't you already have "myth_mtc.sh" in /etc/cron.daily?
I'm quite sure I didn't set that up myself.


Top
 Profile  
 
PostPosted: Thu Jan 24, 2013 3:51 pm 
Offline
Joined: Wed Mar 21, 2012 7:59 am
Posts: 63
does myth_mtc.sh run optimize_mythdb.sh daily? Just wondering because I was thinking about setting up optimization as a daily job, but dont want to do so if it is already covered in a daily script. I looked through the code of myth_mtc.sh, but it was not clear to me if it is checking, repairing, and optimizing tables daily.


Top
 Profile  
 
PostPosted: Thu Jan 24, 2013 5:02 pm 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
myth_mtc.py does not run optimize_mythdb.sh daily, instead it uses it's own builtin procedure that does pretty much the same thing on a daily basis.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 58 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:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu