From owner-freebsd-questions@freebsd.org Tue Oct 24 05:35:32 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A279E405CE for ; Tue, 24 Oct 2017 05:35:32 +0000 (UTC) (envelope-from pschmehl_lists@tx.rr.com) Received: from dnvrco-cmomta02.email.rr.com (dnvrco-outbound-snat.email.rr.com [107.14.73.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C0E470DEF for ; Tue, 24 Oct 2017 05:35:31 +0000 (UTC) (envelope-from pschmehl_lists@tx.rr.com) Received: from [192.168.0.11] ([76.183.153.52]) by cmsmtp with ESMTPA id 6rpee8KMxFdSR6rpgecyGK; Tue, 24 Oct 2017 05:32:57 +0000 Date: Tue, 24 Oct 2017 00:32:52 -0500 From: Paul Schmehl Reply-To: Paul Schmehl To: Adam Vande More cc: FreeBSD Questions 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> <4E78133D6588A3580F02D8D1@Pauls-MacBook-Pro.local> X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-CMAE-Envelope: MS4wfF5OlKjvG9kThfCUprraHQSV6x3W571jGJ+j5lDugmE2Je+Mre1J6/jZyh3tlTvhyTk0fmQbk7kYCQ79IlFtbtefqJ+rcqXJE01tgMgDwiRm4GPbisra 389Gti1qJ6rze1K2kAevnC/tbRxQY1sixl/xMgUwrAlys8bV009xTdAwFDHLCC8650WvqdjV/VOsAxhQGwCwtsl05Q9DGvQ1ChKiQKtHvxq9Fo3mRC8lbppm X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Oct 2017 05:35:32 -0000 --On October 24, 2017 at 12:10:39 AM -0500 Paul Schmehl=20 wrote: > --On October 23, 2017 at 11:02:54 PM -0500 Adam Vande More > wrote: > >> >> On Mon, Oct 23, 2017 at 9: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. >> >> 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