Questions tagged [logrotate]

logrotate is designed to ease administration of systems that generate large numbers of log files. It allows automatic rotation, compression, removal, and mailing of log files. Each log file may be handled daily, weekly, monthly, or when it grows too large.

logrotate is designed to ease administration of systems that generate large numbers of log files. It allows automatic rotation, compression, removal, and mailing of log files. Each log file may be handled daily, weekly, monthly, or when it grows too large.

Normally, logrotate is run as a daily cron job. It will not modify a log multiple times in one day unless the criterium for that log is based on the log’s size and logrotate is being run multiple times each day, or unless the -f or -force option is used.

Any number of config files may be given on the command line. Later con- fig files may override the options given in earlier files, so the order in which the logrotate config files are listed in is important. Nor- mally, a single config file which includes any other config files which are needed should be used. See below for more information on how to use the include directive to accomplish this. If a directory is given on the command line, every file in that directory is used as a config file.

If no command line arguments are given, logrotate will print version and copyright information, along with a short usage summary. If any errors occur while rotating logs, logrotate will exit with non-zero status.

AUTHORS

   Erik Troan 
   Preston Brown 
425 questions
-1
votes
1 answer

CentOS 6.3: logrotate and btmp

I had to configure logrotate on a server configured by other system-network administration. First of all I detected that there is no crond, so I had to install sudo yum install vixie-cron. All other setup seems ok /etc/cron.daily/logrotate file…
happy_marmoset
  • 201
  • 2
  • 5
-1
votes
1 answer

Yesterday-access.log is pointing to a different directory

Under /var/log/ispconfig/httpd/quotednews.com/ folder, the yesterday-access.log is pointing to a wrong directory. yesterday-access.log is just a symlink to: /var/www/clients/client1/web2/log/20130626-access.log. The correct value should…
jaypabs
  • 773
  • 2
  • 9
  • 15
-2
votes
1 answer

log files become to big

i use ubuntu 14.04 each 2 day i need manualy remove log files from: /var/log/apache2/domains 2 files become to big about 5gb, i found solution, edit logrotate.conf found in etc/logrotate.conf this is my logrorate.conf # see "man logrotate" for…
nikola99
  • 101
  • 8
-2
votes
2 answers

Compress files with logrotate

I have a directory structure which contains files already rotated (eg. there is a date part applied to the end). I would like to compress them and keep only 7 of each file type. Is this achievable with logrotate?
Istvan
  • 2,562
  • 3
  • 20
  • 28
-3
votes
1 answer

Daily logrotate doesn't keep the old logs

On a CentOS 6.x I created a simple service called logtraffic which, when started, appends the output of a tcpdump command to a log file at /var/log/logtraffic/logtraffic.log. I want to achieve the following regarding that log: have that log rotated…
Ciprian Stoica
  • 147
  • 2
  • 10
1 2 3
28
29