From owner-freebsd-questions@freebsd.org Tue Oct 24 04:22:11 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 4D3A8E3CB61 for ; Tue, 24 Oct 2017 04:22:11 +0000 (UTC) (envelope-from zgreenfelder@gmail.com) Received: from mail-qt0-x229.google.com (mail-qt0-x229.google.com [IPv6:2607:f8b0:400d:c0d::229]) (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 03E506EC68 for ; Tue, 24 Oct 2017 04:22:11 +0000 (UTC) (envelope-from zgreenfelder@gmail.com) Received: by mail-qt0-x229.google.com with SMTP id z28so28864767qtz.13 for ; Mon, 23 Oct 2017 21:22:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=ZwSLhGQWruFm1k8ZRg1TcWK1/xGnfXqM3rJE/HnsYxI=; b=T4mUqlKTKI4rjEV85DCtvDH19t24if8rnTxaWnJcET8kfUOkNRMrgB3kR1ziJ6DhLd nlFOAJTP5brXOJcXMLQAI4jlZdT1LfsVj+XILCjczOWBB+8MzIhTjLl9xGmjvHyqkBC5 AW+wnhTYDtbHfxIsazKF2VkwJ4MJUsKsWRBNvvwd6ma44t9+ntRMXd1ahK0VmHh7faVA L2DKfnIv3uFV6GwXFJgrIxtFRFl49WaWJOs/tYa+fsc1XTTr7FLkK/QnJXCW35Jy5vBz iVF6ltM+m17L0vcxD17yD0jvMIYy6Z/7GwYlqcC2tHAYOgBS6OgKfl6LwLOoypmmiW6e 2kfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=ZwSLhGQWruFm1k8ZRg1TcWK1/xGnfXqM3rJE/HnsYxI=; b=Ln22I1bdFFBPi44PJcnFnII7CsayhTF5f2HCOE2bxKZI+0aPn5ZXsivSG/VUjbWpI4 Scj5LKVPCounBC3jQrN98k0g/ZdGLy2HiospbvVn1j+2srt0AxklBJun3ZlrXdLhrkne DVYIZHFWVTntEVWC2DE52WdYY8nZiOWy7r6oObzkhjIwEmS5GGps4KfsH6cDw5fnRrgg qAfyn5ulucK0IEnt/DbPOi4+vaCGoblIgT4e9UV1TKR94lmCQLfWAG5WPGMAXB04RpGD Lz4rQjvZyj52OJmpuOC7eOULnrhWcuVAQRmLvH1EVkLam8sbSMiDln4QnK0NZMdzaaWE oVJw== X-Gm-Message-State: AMCzsaX/1xA7+7f5Y1AtudQ4A78tPHLOTa+fIhA7ANP+m5Sh8r9TbJ2W 7ycV3LhMIDkIWSS6Zbf7yCKko8xl X-Google-Smtp-Source: ABhQp+RcLXALc4wcYNi0JPWrBKzmjpFzwtXuyCecn1rwKSjiYo4r3PluGg+8jetaqgKiL5+PAcJ0jA== X-Received: by 10.200.15.136 with SMTP id b8mr23838094qtk.64.1508818929503; Mon, 23 Oct 2017 21:22:09 -0700 (PDT) Received: from [192.168.10.31] (pool-71-178-8-115.washdc.fios.verizon.net. [71.178.8.115]) by smtp.gmail.com with ESMTPSA id u48sm5891947qtk.77.2017.10.23.21.22.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2017 21:22:08 -0700 (PDT) Subject: Re: Strange periodic problem To: freebsd-questions@freebsd.org References: <99E0408A95C01319659D7EFF@Pauls-MacBook-Pro.local> From: zep Message-ID: <37900d35-8059-d0af-f392-a44042c5f4f9@gmail.com> Date: Tue, 24 Oct 2017 00:22:06 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <99E0408A95C01319659D7EFF@Pauls-MacBook-Pro.local> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US 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:22:11 -0000 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?)