Gentoo Archives: gentoo-user

From: Tanstaafl <tanstaafl@×××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Hows this for rsnapshot cron jobs?
Date: Sun, 21 Apr 2013 20:49:50
Message-Id: 517450C6.8000309@libertytrek.org
In Reply to: Re: [gentoo-user] Hows this for rsnapshot cron jobs? by Alan McKinnon
1 On 2013-04-21 4:32 PM, Alan McKinnon <alan.mckinnon@×××××.com> wrote:
2 > On 21/04/2013 20:47, Tanstaafl wrote:
3 >>> 30 20 1 * * root rsnapshot -c /etc/rsnapshot/myhost1.conf monthly
4 >>> 20 20 1 * * root rsnapshot -c /etc/rsnapshot/myhost1.conf yearly
5
6 > Only the last line is wrong - your monthly and yearly are equivalent.To
7 > be properly yearly, you need a month value in field 4.
8
9 Oh, right (I added that interval myself, rsnapshot only comes with the
10 hourly, daily weekly and monthly by default).
11
12 So, if I wanted it to run at 8:20pm on Dec 31, it would be:
13
14 20 22 31 12 * root rsnapshot -c /etc/rsnapshot/myhost1.conf yearly
15
16 > I'm not familiar with rsnapshot, I assume that package can deal with how
17 > many of each type of snapshot to retain in it's conf file? I see no
18 > crons to delete out of date snapshots.
19
20 Correct, rsnapshot handles this.
21
22 > And, more as a nitpick than anything else, I always recommend that when
23 > a sysadmin adds a root cronjob, use crontab -e so it goes in
24 > /var/spool/cron, not /etc/crontab. Two benefits:
25 >
26 > - syntax checking when you save and quit
27 > - if you let portage, package managers, chef, puppet or whatever manage
28 > your global cronjobs in /etc/portage, then there's no danger that system
29 > will trash the stuff that you added there manually.
30
31 I prefer doing things manually... so, nothing else manages my cron jobs.
32
33 That said, I prefer to do this 'the gentoo way'... so is crontab -e the
34 gentoo way?
35
36 ;)

Replies

Subject Author
Re: [gentoo-user] Hows this for rsnapshot cron jobs? Alan McKinnon <alan.mckinnon@×××××.com>