LinHES Forums

Mythbackup and mythwelcome
Page 1 of 1

Author:  nmcaullay [ Mon Feb 15, 2010 7:00 pm ]
Post subject:  Mythbackup and mythwelcome

Hi All,

I'm using mythwelcome to auto-turn-on for recording, rather than leaving the box on 100%

My question is that when i perform a backup (from the LinHES menus), the pc shuts down after a period of time.

My guess is that mythbackup stops the mythbackend (to perform the backup), and mythwelcome thinks that since the backend is down, that its time to turn off.

If this is true, what facility do we have to do something like
1) "lock" the shutdown in mythwelcome
2) do the mythbackup
3) "unlock" the shutdown in mythwelcome

Has anyone else experienced this? Thoughts appreciated.



Author:  nicom [ Mon Feb 15, 2010 7:55 pm ]
Post subject: 

Yes mine does the same thing and I am never sure whether it has shutdown correctly and will wake when required. So I always restart and then shutdown via Mythwelcome to make sure. Preventing the shutdown would be good.

Note I am still using R5.5.

Author:  tjc [ Mon Feb 15, 2010 10:19 pm ]
Post subject: 

The current versions of the backup script (which includes the one in R5.5) do:
/usr/bin/mythshutdown --lock

before starting the real work to prevent the auto-shutdown and then
/usr/bin/mythshutdown --unlock

afterward to enable normal operations. This posting in the "Taking advantage of the enhanced backup and restore scripts" thread covers some reasons that you might still have problems: Generally auto-restart or watchdog scripts are the biggest source of problems.

Author:  nmcaullay [ Mon Feb 15, 2010 10:55 pm ]
Post subject: 

Hmmm, interesting... on my KM box the only non-standard regular script that gets run be cron is a mythfilldatabase (shepherd)... might need to look into the logs to see what is shutting down... it must be mythwelcome doing the shutdown, but i wonder why it is failing to abort shutdown when it does the mythshutdown --check.... i'll have a poke around tonight.



Author:  alien [ Tue Feb 16, 2010 2:25 am ]
Post subject: 

Yes, I had problems where the frontend would not connect to the backend after the backup and it would shutdown since there was no frontend.

locking/unlocking won't completely fix the problem. After you unlock, it will shutdown if the frontend isn't connected. You have to restart the frontend as well.

I avoided all this by creating a daily wakeup period in mythwelcome and then running a cron script in that period. The backup portions of my script look like:

# Make sure we aren't recording....
while (($status=system("/usr/bin/mythshutdown -s")/256) != 64) {

# Just in case waiting for a recording pushed us out of the wakeup period
system("/usr/bin/mythshutdown -l");

$error=system("/usr/LH/bin/mythbackup > /tmp/mythbackup.out 2>&1");
if($error) {
        system("cat /tmp/mythbackup.out | /usr/bin/mail -s mythbackup mythtv");
system("/usr/bin/mythshutdown -u");
Note: I don't need to restart the frontend because this is a daily wakeup period.

Author:  tjc [ Tue Feb 16, 2010 6:27 pm ]
Post subject: 

Unfortunately restarting the FE from within mythbackup doesn't play well with the fact that it's often run from there. Using a simple wrapper script is probably the best answer.

I've helped folks with these in the past, and even put together the script for that purpose. Searching the forums for "" should turn up the threads pretty quickly.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group