[mythtv-users] mythconverg database maintenance and backup
Stephen Worthington
stephen_agent at jsw.gen.nz
Sun Jan 14 13:00:54 UTC 2018
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 )
>#
Do the files in the /etc/cron.daily directory have root ownership and
the correct permissions? This is what mine look like:
root at mypvr:/etc/cron.daily# ll
total 116
drwxr-xr-x 2 root root 4096 Dec 20 23:33 ./
drwxr-xr-x 189 root root 12288 Jan 1 03:30 ../
-rwxr-xr-x 1 root root 311 Jun 20 2010 0anacron*
-rwxr-xr-x 1 root root 539 Apr 6 2016 apache2*
-rwxr-xr-x 1 root root 376 Apr 5 2014 apport*
-rwxr-xr-x 1 root root 1474 Nov 1 2016 apt-compat*
-rwxr-xr-x 1 root root 314 Mar 31 2012 aptitude*
-rwxr-xr-x 1 root root 355 Jun 5 2013 bsdmainutils*
-rwxr-xr-x 1 root root 384 Mar 24 2014 cracklib-runtime*
-rwxr-xr-x 1 root root 532 Mar 9 2012 debsums*
-rwxr-xr-x 1 root root 1597 Nov 27 2015 dpkg*
-rwxr-xr-x 1 root root 56 Oct 17 2015 jfs-filestructure-backup*
-rwxr-xr-x 1 root root 372 Oct 5 2011 logrotate*
-rwxr-xr-x 1 root root 1293 Nov 7 2015 man-db*
-rwxr-xr-x 1 root root 435 Jun 21 2013 mlocate*
-rwxr-xr-x 1 root root 2069 Apr 21 2016 mythexport*
-rwxr-xr-x 1 root root 844 Oct 8 01:28 mythtv-database*
-rwxr-xr-x 1 root root 242 Jun 11 2010 mythtv-status*
-rwxr-xr-x 1 root root 1387 Oct 6 2016 ntp*
-rwxr-xr-x 1 root root 1298 Dec 31 2015 optimize_mythdb*
-rwxr-xr-x 1 root root 249 Apr 9 2012 passwd*
-rw-r--r-- 1 root root 102 Apr 2 2012 .placeholder
-rwxr-xr-x 1 root root 3449 Feb 27 2016 popularity-contest*
-rwxr-xr-x 1 root root 383 Apr 13 2012 samba*
-rwxr-xr-x 1 root root 441 Nov 11 2013 sysstat*
-rwxr-xr-x 1 root root 214 Apr 20 2012 update-notifier-common*
-rwxr-xr-x 1 root root 1046 May 20 2016 upstart*
If the write permissions are too permissive, I think cron will not run
them.
If you have an email system installed locally, then cron will email
root a copy of the cron logs each day.
More information about the mythtv-users
mailing list