From owner-freebsd-questions@freebsd.org Tue Oct 24 04:02:55 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 DBA8AE3B9CA for ; Tue, 24 Oct 2017 04:02:55 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A31476E24C for ; Tue, 24 Oct 2017 04:02:55 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: by mail-it0-x22a.google.com with SMTP id l196so8453160itl.4 for ; Mon, 23 Oct 2017 21:02:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zVXLF7KxDVIhBJea/rMxmCNWPXMFuu1t6CHppzJZaRU=; b=MQvZROW02bOGvwri0Z4Rlk+TtqP2rwXrFtf4DYtBSmxTODwCDu3Yo4o3cLQ+wzvf68 kSrDlT4II7k/D2VMSAnOa6qRHEVq7HVNGQoslBMbFUZ1a0nSnNoEi7u//RxKYjDjLU4o RWKrGu5dRlAtHQNzcfGEW5ePobL2rLNN2aZyCoFV2rAeKxgCz5Qw1LwxXD9b0QtoTKb4 s4ivSYAUj0azNSaYxda1P0xYBVsRfWY7zxiwMgJXgT/wA3BJEcXWH5SWTU2sMhGN0eYe EWmiOokoXvsl5pNuZq6lCa1OT5LVy57ihOAt6Rw7P8c77fuV1XIWHbjPV7XVEZB5/mPt 3ByA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zVXLF7KxDVIhBJea/rMxmCNWPXMFuu1t6CHppzJZaRU=; b=C7WlP8HMHS7V/5XuvwhmPNxziZw8mFNsuj0PyXIbBLSiBhqYBYzgmi45LHSRVqQyj9 TqptcO4xapHdAXBIqfDI/2OC4VRyRlGO4tPXruX2PX3wLQyLLEhspRiv0hwCh5xbahoh 1cxtfqGHUBo4SF1pkLjLO231ud/iDQhR/MpvMxlAoZYMsv7DsgfTIhcQM4CACvAYr/XB 6QGKUy3LycuxVwwqwlmkyzy/+QUJ5QSrx7hCD70VSdHEZ27WFf7WMNCVT+C+3CfYhIgU AzJjS65RRe0vflAzVSYMDz/QI7eB2xdAkI5zBv2c3kqloAe/61tGTgTgQH6+WAdfyAQH 7Hdg== X-Gm-Message-State: AMCzsaW7v6HeJSHgaXXsUXrUMOKGePKu/O8nZSxHmos9/GLxOj7ypLBv DPfNMXaZMb2LLUA69Z50P3lANLRnXEqBC6y37Ys= X-Google-Smtp-Source: ABhQp+TeySImHo+S4A78QRUlNzFTRWxvp/O67yl0uq4nFFDsfjJFENWu4DsBPOgn5O8pLsTYqhi6VT4lU8K2SjvuON4= X-Received: by 10.36.51.212 with SMTP id k203mr12622690itk.74.1508817775059; Mon, 23 Oct 2017 21:02:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.176.201 with HTTP; Mon, 23 Oct 2017 21:02:54 -0700 (PDT) In-Reply-To: <99E0408A95C01319659D7EFF@Pauls-MacBook-Pro.local> References: <99E0408A95C01319659D7EFF@Pauls-MacBook-Pro.local> From: Adam Vande More Date: Mon, 23 Oct 2017 23:02:54 -0500 Message-ID: Subject: Re: Strange periodic problem To: Paul Schmehl Cc: FreeBSD Questions Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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 04:02:56 -0000 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 1 root wheel 37 Oct 19 12:31 /etc/periodic/daily/220.dbback > up > > 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="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? > Does the cron log indicate entry ran? -- Adam