From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D4D751381F3 for ; Mon, 22 Apr 2013 07:27:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 69059E0996; Mon, 22 Apr 2013 07:27:36 +0000 (UTC) Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9A23DE097B for ; Mon, 22 Apr 2013 07:27:34 +0000 (UTC) Received: by mail-wg0-f45.google.com with SMTP id l18so735298wgh.12 for ; Mon, 22 Apr 2013 00:27:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=VpNt8dRq3GAGHOws+mhKsmAK7ljqbdozfoCG7ENT/bU=; b=jKSSgF9G2XApBKEGOX01+T9dhk1x3pn8EZnWGI0kB+zwurrxEA+kWG86px/ZFuPAZ1 Q9PNzYX4v3TUYu5MVYfDoFItI7GiqgMAdR3laTmLRkQex1J5NBiGwADZj05oR4hcjLax vzKOa2z6ZlkyT1zrx50q2pw+Pt90LRetAoaTDvcVxk8mV+j5KoZs5NCroxSkJUcYTz58 FgC2aOAsXNhsomy8g0G4XqJJG3a1kEWPWaVDT6syHPMQ4tJWRsO7YYbMb22x4QN++xYr 5FXobO8zkrMkMJGSEwamM/kTNqMY6s/32PnMoXl88FKr+YY0oXeMkLfbxKhduuA73kwq ztlw== X-Received: by 10.194.5.196 with SMTP id u4mr49474331wju.54.1366615653280; Mon, 22 Apr 2013 00:27:33 -0700 (PDT) Received: from [10.1.21.8] (dustpuppy.is.co.za. [196.14.169.11]) by mx.google.com with ESMTPS id ch6sm38674244eeb.17.2013.04.22.00.27.31 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 22 Apr 2013 00:27:32 -0700 (PDT) Message-ID: <5174E638.6090502@gmail.com> Date: Mon, 22 Apr 2013 09:26:48 +0200 From: Alan McKinnon User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130413 Thunderbird/17.0.5 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Hows this for rsnapshot cron jobs? References: <5174345C.9080304@libertytrek.org> <51744CF6.80305@gmail.com> <517450C6.8000309@libertytrek.org> In-Reply-To: <517450C6.8000309@libertytrek.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: dbfb7ae6-da5f-4afe-aa52-e08131a25464 X-Archives-Hash: 70499eabed5c56169147d2c7ef823b06 On 21/04/2013 22:49, Tanstaafl wrote: > On 2013-04-21 4:32 PM, Alan McKinnon wrote: >> On 21/04/2013 20:47, Tanstaafl wrote: >>>> 30 20 1 * * root rsnapshot -c /etc/rsnapshot/myhost1.conf >>>> monthly >>>> 20 20 1 * * root rsnapshot -c /etc/rsnapshot/myhost1.conf yearly > >> Only the last line is wrong - your monthly and yearly are equivalent.To >> be properly yearly, you need a month value in field 4. > > Oh, right (I added that interval myself, rsnapshot only comes with the > hourly, daily weekly and monthly by default). > > So, if I wanted it to run at 8:20pm on Dec 31, it would be: > > 20 22 31 12 * root rsnapshot -c /etc/rsnapshot/myhost1.conf yearly Correct >> I'm not familiar with rsnapshot, I assume that package can deal with how >> many of each type of snapshot to retain in it's conf file? I see no >> crons to delete out of date snapshots. > > Correct, rsnapshot handles this. > >> And, more as a nitpick than anything else, I always recommend that when >> a sysadmin adds a root cronjob, use crontab -e so it goes in >> /var/spool/cron, not /etc/crontab. Two benefits: >> >> - syntax checking when you save and quit >> - if you let portage, package managers, chef, puppet or whatever manage >> your global cronjobs in /etc/portage, then there's no danger that system >> will trash the stuff that you added there manually. > > I prefer doing things manually... so, nothing else manages my cron jobs. > > That said, I prefer to do this 'the gentoo way'... so is crontab -e the > gentoo way? There's no "gentoo way" for this :-) Admittedly, things have changed over the years, most distros now have the equivalent of "cron.daily" etc that cron jobs get installed into, leaving the main /etc/crontab as a place to put the lastrun logic. It wasn't always like that though. If you ever move to puppet or similar to do your configs you'll want to revisit this. Meanwhile, as you do everything manually anyway, your current method seems to work just fine for you -- Alan McKinnon alan.mckinnon@gmail.com