1 |
Ok, my goal is to keep 3 'snapshots' per day (11:30am, 2:30pm and |
2 |
5:30pm), 7 daily's (8:50pm), 4 weekly's (8:40pm), 12 monthly's (8:30pm), |
3 |
and 5 yearly's (8:20pm). |
4 |
|
5 |
My myhost1.conf has: |
6 |
|
7 |
interval hourly 3 |
8 |
interval daily 7 |
9 |
interval weekly 4 |
10 |
interval monthly 12 |
11 |
interval yearly 5 |
12 |
|
13 |
And my /etc/crontab now looks like: |
14 |
|
15 |
> # for vixie cron |
16 |
> # $Header: /var/cvsroot/gentoo-x86/sys-process/vixie-cron/files/crontab-3.0.1-r4,v 1.3 2011/09/20 15:13:51 idl0r Exp $ |
17 |
> |
18 |
> # Global variables |
19 |
> SHELL=/bin/bash |
20 |
> PATH=/sbin:/bin:/usr/sbin:/usr/bin |
21 |
> MAILTO=root |
22 |
> HOME=/ |
23 |
> |
24 |
> # check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly |
25 |
> 59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly |
26 |
> 9 3 * * * root rm -f /var/spool/cron/lastrun/cron.daily |
27 |
> 19 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly |
28 |
> 29 5 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly |
29 |
> */10 * * * * root test -x /usr/sbin/run-crons && /usr/sbin/run-crons |
30 |
> # |
31 |
> # rsnapshot cronjobs |
32 |
> # |
33 |
> 30 11,14,17 * * * root rsnapshot -c /etc/rsnapshot/myhost1.conf sync; rsnapshot -c /etc/rsnapshot/myhost1.conf hourly |
34 |
> 50 20 * * * root rsnapshot -c /etc/rsnapshot/myhost1.conf daily |
35 |
> 40 20 * * 6 root rsnapshot -c /etc/rsnapshot/myhost1.conf weekly |
36 |
> 30 20 1 * * root rsnapshot -c /etc/rsnapshot/myhost1.conf monthly |
37 |
> 20 20 1 * * root rsnapshot -c /etc/rsnapshot/myhost1.conf yearly |
38 |
|
39 |
Does this look right? |
40 |
|
41 |
Thanks |