Strange periodic problem

zep zgreenfelder at gmail.com
Tue Oct 24 04:22:11 UTC 2017


On 10/23/2017 10:51 PM, Paul Schmehl 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.

what does your /etc/crontab file look like?  how does it compare
between the two machines?
>
> The periodic script is executable.
> # ls -lsa /etc/periodic/daily/220.dbbackup
> 2 -rwxr-xr-x  1 root  wheel  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
>   

do you get anything more useful if you change the line to sh -x to
call the .sh file?  is it possible there are some weird control
characters in any of those files?  e.g. do they still look the
same if you cat -v them?

> Periodic.conf enables the script.
> # grep dbbackup /etc/periodic.conf
> daily_dbbackup_enable="YES"
>
> The script itself is executable.
> # ls -lsa /usr/local/bin/dbbackup.sh
> 2 -rwxr-xr-x  1 root  wheel  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?
>
> Paul Schmehl, Retired
>
>

what version of freebsd did it first run on?  what's the version of the
new machine (or more importantly, are they at the same versions?)




More information about the freebsd-questions mailing list