-
Notifications
You must be signed in to change notification settings - Fork 0
/
00-site-basics-07-logrotate.cfg
44 lines (32 loc) · 1.31 KB
/
00-site-basics-07-logrotate.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Buildout Configuration File for logrotate products
[buildout]
extends = 00-site-basics-06-backup.cfg
parts +=
logrotate
logrotate-daily
# move-backup-log
# This recipe helps to initializes a logrotate configuration file
# For options see http://pypi.python.org/pypi/collective.recipe.template
[logrotate]
recipe = collective.recipe.template
# a input template file should be created on based
input = ${buildout:directory}/templates/logrotate.conf.tmpl
# a output file should be created on based a template input
output = ${buildout:directory}/etc/logrotate.conf
# This recipe helps to configure a daily log rotation crontab job.
# For options see http://pypi.python.org/pypi/z3c.recipe.usercrontab
[logrotate-daily]
recipe = z3c.recipe.usercrontab
# The time based on crontab format
times = 0 6 * * *
# Comands to run
command = /usr/sbin/logrotate --state ${buildout:directory}/var/logrotate.status ${logrotate:output}
# This recipe helps to copy backup data from one place to another via rsync with a crontab job.
# For options see http://pypi.python.org/pypi/z3c.recipe.usercrontab
#[move-backup-log]
#recipe = z3c.recipe.usercrontab
#times = 0 3 * * 7
#keep = 0
#gzip = true
#command =
# rsync -av ${buildout:directory}/var/log/* ${hosts:user-bnk}@${hosts:dns-bnk}:/home/${hosts:user-bnk}/Backups/Plone/log/