[mythtv-users] mythconverg database maintenance and backup

Jim Abernathy jfabernathy at outlook.com
Mon Jan 15 12:31:01 UTC 2018



On 01/14/2018 09:58 AM, Jim Abernathy wrote:

On 01/14/2018 08:00 AM, Stephen Worthington wrote:
On Sun, 14 Jan 2018 12:26:48 +0000, you wrote:

I know I must be missing something simple.  Yesterday I worked to get the suggested optimize and backup scripts for mythconverg into the cron.daily directory.  I tested each of these scripts by running them as:

sudo /etc/cron.daily/mythtv-backup

sudo /etc/cron.daily/optimize_mythdb

They both worked and I had the backup files where they should be and data in the syslog and /var/log/mythtv/optimize_mythdb.log files to indicate they ran okay.

This morning anacron should have run at 6:25 my 2 daily scripts but it didn't and there is no indication in the syslog of it running. This is what I see at 6:25:

Jan 14 06:25:01 mythbuntu CRON[11179]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ))

I again manually ran the scripts as before and they work.

Any idea on why they may not be running automatically?

My crontab is below.

Jim A


SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user    command
17 *    * * *    root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *    root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6    * * 7    root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6    1 * *    root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#

I did find that when I ran :
sudo run-parts /etc/cron.daily
I had a problem with the optimize_mythdb because there was a comment as the first line in the script.  Needed to be #!/bin/sh
Now to see if it runs a 0625 tomorrow.

Jim A

So I waited until after 6:25 this morning and my scripts didn't run. Only one entry in syslog about cron.daily running.

About 6:55 I decided to reboot the server.  While readingemail I got one at 7:16 that my database had been backed up and I checked syslog again and at 7:01 my cron.daily jobs ran correctly and the backup was in the right place.

I have no idea why it ran at 7:01 and not 6:25 as crontab has setup.

Strange,

Jim A






_______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org<mailto:mythtv-users at mythtv.org>
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20180115/8963c688/attachment.html>


More information about the mythtv-users mailing list