Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Oct 2017 00:32:52 -0500
From:      Paul Schmehl <pschmehl_lists@tx.rr.com>
To:        Adam Vande More <amvandemore@gmail.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Strange periodic problem
Message-ID:  <18B2B9253D99A3E5D84E661D@Pauls-MacBook-Pro.local>
In-Reply-To: <4E78133D6588A3580F02D8D1@Pauls-MacBook-Pro.local>
References:  <99E0408A95C01319659D7EFF@Pauls-MacBook-Pro.local> <CA%2BtpaK3B56i2xG%2BPeMmQvrRpiRG5EHiMhPE=OhJRmjZcVAXo8A@mail.gmail.com> <4E78133D6588A3580F02D8D1@Pauls-MacBook-Pro.local>

next in thread | previous in thread | raw e-mail | index | archive | help
--On October 24, 2017 at 12:10:39 AM -0500 Paul Schmehl=20
<pschmehl_lists@tx.rr.com> wrote:

> --On October 23, 2017 at 11:02:54 PM -0500 Adam Vande More
> <amvandemore@gmail.com> wrote:
>
>>
>> On Mon, Oct 23, 2017 at 9:51 PM, Paul Schmehl <pschmehl_lists@tx.rr.com>
>> wrote:
>>
>>
>>
>> I wrote a script to do database backups. It worked well, so I copied it
>> to another server. I had to alter it, because the db was too big to send
>> through email, so it creates the backup, removes the previous days and
>> then sends email to me notifying me that it ran. Except, it doesn't =
work.
>>
>> And I have no idea why.
>>
>> The periodic script is executable.
>># ls -lsa /etc/periodic/daily/220.dbbackup
>> 2 -rwxr-xr-x=C2=A0 1 root=C2=A0 wheel=C2=A0 37 Oct 19 12:31
>> /etc/periodic/daily/220.dbbackup
>>
>> The script calls sh to run the actual script.
>># cat /etc/periodic/daily/220.dbbackup
>># !/bin/sh
>> /usr/local/bin/dbbackup.sh
>>
>> Periodic.conf enables the script.
>># grep dbbackup /etc/periodic.conf
>> daily_dbbackup_enable=3D"YES"
>>
>> The script itself is executable.
>># ls -lsa /usr/local/bin/dbbackup.sh
>> 2 -rwxr-xr-x=C2=A0 1 root=C2=A0 wheel=C2=A0 446 Oct 11 23:40
>> /usr/local/bin/dbbackup.sh
>>
>> The script runs manually, and I get the email.
>># /usr/local/bin/dbbackup.sh
>> rm: /usr/home/pauls/102217.alldb.sql: No such file or directory
>>
>> (The previous backup doesn't exist, because the script isn't running
>> daily.)
>>
>> What have I missed?
>>
>>
>>
>> Does the cron log indicate entry ran?
>
> No. But that was a really good question, because now that I look at it
> *none* of the periodic scripts are running. Strange.
>

This is incorrect. I've confirmed that the jobs are running, but there is=20
no entry in /var/log/cron for any of them, which seems strange.

I'll have to investigate further.


Paul Schmehl, Retired




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?18B2B9253D99A3E5D84E661D>