0
votes
1answer
39 views

apache error logs issue

I have a vps server but the vps provider stop managed service. I having problem with logs file. Every thing seems was alright, but after few month auto logs deletion does not working. Every minute the ...
11
votes
3answers
397 views

How to continue redirecting stdout to a file after logrotate moves it?

I have a simple script which outputs a bunch of logs to screen and I piped the STDOUT to a file to store the logs. Since this script is long running, I needed to rotate the log files so they are ...
1
vote
1answer
202 views

SELinux permissions for LogRotate and Apache

With the directory structure: /www/live/website1/app/ /www/live/website1/files/ /www/live/website1/logs/ Where Apache needs at least the following access: app: read-only access, but read-write is ...
0
votes
1answer
70 views

Linux cp with gzip and numbered backup in one step?

I'm wanting to copy a file and gzip it in a single command/step But I want to do numbered backup if the file already exists i.e. "cp --backup=numbered" or similar. The reason for the single step is ...
0
votes
0answers
74 views

Logrotate config for a laravel application

I have a laravel application which writes the log file names like log-apache2handler-2013-11-17.txt In my logrotate script, I am doing *.txt however this filename is going to change everyday, so by ...
5
votes
1answer
118 views

How does logrotate handle concurrency?

In the case that logrotate runs the same time as the log file is being updated, what will happen? Will the new log be rotated into a historical log file? Or it will stay in the current log file? ...
1
vote
2answers
82 views

make logrotate to only rotate at service startup

i'd like to do logfile rotation for whenever i start a service, but never "automatically". i'm running a python-based service that logs to a specific logfile. the service (currently) does not support ...
4
votes
2answers
944 views

Rsyslog stops sending data to remote server after log rotation

In my configuration, I have rsyslog who is in charge of following changes of /home/user/my_app/shared/log/unicorn.stderr.log using imfile. The content is sent to another remote logging server using ...
0
votes
1answer
40 views

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: ...
1
vote
1answer
280 views

Append date to domain logs with logrotate in Plesk 11

I am using plesk with a Media Temple DV 4.0 Account. It has a GUI to set up log rotation for my domains. However I need to append a date/time stamp to the logs so our stats software importer can ...
2
votes
1answer
266 views

How backup files with logrotate and Amazon S3?

I would like to create a new standard of two things: how long would be generated and be rotated the logs generated by my applications ? how to transfer the logs to Amazon S3, as a backup server ?. ...
0
votes
0answers
77 views

Logrotate 'nocompress' not honoured

Using RHEL6.1 & logrotate 3.7.8-12. I'm able to use logrotate & rotate my files. What I don't want is compression. For some reason, even after specifying 'nocompress', some files are getting ...
2
votes
3answers
3k views

Why does my CentOS logrotate run at random times?

I put a logrotate configuration file in /etc/logrotate.d/ and expected the logs to rotate at a consistent time; however, they do not... log rotation times are seemingly random +/- one hour. Why are ...
4
votes
1answer
567 views

Rotating logs generated by a process that logs to stdin

I have a long running process, that writes its log file to stdout. I would like to save this output to different files, automatically maintain these files (like deleting/archiving the old ones), ...
1
vote
1answer
191 views

Linux logrotate offset delay

I have servers with huge daily size of log files ~ 1GB. I want to do daily logrotate at midnight. The problem is for each rotated file missing first 17-25 minutes after midnight and same file ...
1
vote
1answer
47 views

logrotate : Contents are missing

I'm using logrotate to rotate my log file periodically (in my case every 1 hour checking for log file size and rotate if needed using cron). I'm facing a serious issue in it. The following files ...
0
votes
2answers
220 views

logrotate: keep N newest files, but don't rename

I have a service that automatically creates a log file with a timestamp in the filename on startup. Thus, I don't need logrotate to rename/copy/create files, but what I do want is that logrotate shall ...
0
votes
1answer
648 views

logrotate is not executing custom shell script in postrotate

I have following logrotate configuration file /home/application/*/shared/log/*.log { daily rotate 10 missingok nocompress notifempty copytruncate sharedscripts postrotate echo ...
6
votes
2answers
253 views

Logrotation - postrotate firing too soon?

I have a configuration file that looks like: /var/log/nginx/*.log { daily missingok rotate 90 dateext compress notifempty create 644 root adm ...
-2
votes
2answers
94 views

Compress files with logrotate [closed]

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 ...
3
votes
3answers
86 views

logrotate security

Are there any concerns about the security of logrotate running as root? Had someone ask couldn't a malicious user subvert the config to overwrite anything? Is is okay to run logrotate out of the ...
4
votes
1answer
3k views

Logrotate does not remove old logs

for some reason the old log files are not deleted. Example with apache What the conf file says: $ cat /etc/logrotate.d/apache2 /var/log/apache2/*.log { weekly missingok rotate 2 ...
8
votes
3answers
380 views

Free-space driven log rotation on linux?

Someone just asked me 'how long should we keep logs for our application', and my answer was 'until the disk is full' as there's no reason to throw them away other than running out of space. However, ...
0
votes
1answer
188 views

setting logrotate to use UTC time

Is it possible to force logrotate to use UTC time for one configuration? I need the dateext to be set to UTC. I was hoping it was as simple as setting a date varible. Should I just run postrotate and ...
0
votes
2answers
244 views

Logrotate won't rotate logs with a space

I have a log file a service of mine makes that has the filename "Feed1 - 1.stat". logrotate refuses to rotate this file, but only when run via cron. Running logrotate via the shell will rotate the ...
0
votes
1answer
174 views

Understanding logrotate's create directive

There is a web application (php/apache2) which opens a log file somewhere at a start of a request handling and closes it (as far as I know) when the handling is finished. Between log file open and ...
2
votes
3answers
869 views

Preferred format of file names which include a timestamp

As we all know "unix" can have anything in a file except '/' and '\0', sysadmins however tend to have a much smaller preference, mainly due to nothing liking spaces as input ... and a bunch of things ...
0
votes
2answers
198 views

logrotation size limit is not effecting

I have fixed size limit in logrotation 1M. The script run on every hours even though its rotating less than 1Mb files. I dont know what i have done wrong. Below is my configuration parameters. ...
2
votes
1answer
1k views

Understanding reference to /var/log/wtmp in /etc/logrotate.conf

I have the following lines in my /etc/logrotate.conf file which I'm not quite sure what they do: (Edited in to show full file) # see "man logrotate" for details # rotate log files weekly weekly # ...
1
vote
1answer
591 views

Determine root cause of broken pipe on Linux?

I have a webapp running on some servers that have their Apache log files on an OCFS2 SAN volume. The internal webapp logging is done using log4perl, in pipe mode, with cronolog on the other end of ...
1
vote
2answers
531 views

Any good reason not to use date-based logfile rotation (rdiff-backup)?

rdiff-backup is a really nice tool for backing up Linux servers. One problem, though, is logrotation: Since rdiff-backup doesn't know how to detect renamed files, every daily backup contain a ...
0
votes
2answers
211 views

logrotate pattern matching for daemon restart

In a setup very much like: http://wiki.apache.org/httpd/ExtendingPrivilegeSeparation I have logs located in /var/weblog/<domain>/error_log I would like to use logrotate to rotate these logs ...
6
votes
2answers
2k views

rotate nohup out file (nohup.log)

is there a 'native' way where i can rotate nohup out file ?
6
votes
3answers
3k views

Logrotate Successful, original file goes back to original size

Has anyone had any issues with logrotate before that causes a log file to get rotated and then go back to the same size it originally was? Here's my findings: Logrotate Script: ...
1
vote
1answer
81 views

Alter an existing logrotate file on package install

I have created a debian package that sets up awstats and the required scripts for a couple of hostnames in a server I have. My problem is with logrotate, I already update the stats with a cron job I ...
1
vote
1answer
559 views

Apache Logrotate Bash Question

... so I'm trying to rotate logs on amazon cloud auto-scaled server instances every hour. I've created /etc/cron.hourly/logrotate to read: #!/bin/bash test -x /usr/sbin/logrotate || exit 0 ...
10
votes
2answers
8k views

How does logrotate exactly handle “daily”?

Judging by the timestamps on my systems, logrotate does its daily log rotation when logrotate is run by cron. However, if I run it earlier than that it doesn't rotate the files. How does logrotate ...
0
votes
2answers
821 views

can I use logrotate to rotate /core files?

On remote linux-based devices, I thought I'd use logrotate to manage any core files our appliance may create. But it seems logrotate considers every core file a unique file since the filename ...
5
votes
3answers
2k views

Logrotate: Rotating non-log files?

I have a backup script that compresses various files and directories and creates .tgz archives. Files are named, e.g. ... backup_2010-10-28.tar.gz backup_2010-10-29.tar.gz backup_2010-10-30.tar.gz ...
6
votes
4answers
1k views

Rotate logs of a dumb non-interactive application

Ubuntu 10.4 Server. I have a dumb non-interactive legacy service which is running constantly on my server. It is writing its log to a file with fixed name (/var/log/something.log). It does not ...
6
votes
4answers
13k views

logrotate does not compress /var/log/messages

Over time I noticed some logs in /var/log such as auth, kern and messages were getting huge. I made logrotate entries for them: $ cat /etc/logrotate.d/auth.log /var/log/kern.log { rotate 5 ...
2
votes
4answers
3k views

Daily Weekly and Monthly DB backup with logrotate?

I am currently keeping daily backup of my database by doing a daily mysqldump and by using logrotate to keep the 7 last days of mysqldump. I would like to improve this backup process to keep 7 daily ...
4
votes
4answers
3k views

Exclude files / dirs logrotate

I am logging all our applications logs to /logs/, where all our applications have an seperate directory. I have made a custom logrotate file as follows: /logs/*.log { daily missingok rotate 1 ...
2
votes
2answers
330 views

Two scripts in /etc/cron.daily seem to be rotating my logs: logrotate and sysklogd

It seems that my logfiles generated by syslog are getting rotated twice each day. I believe this is due to both /etc/cron.daily/logrotate and /etc/cron.daily/sysklogd doing overlapping work. Here are ...
3
votes
3answers
3k views

Logrotate creates long names and does not delete logs

postgres_db_dump_20091016.gz.1.1.1.1.1.1.1.1.1.1.1-20091021-20091021-20091021-20091021-20091021-20091021-20091021-20091021-20091021-20091021 ...
2
votes
2answers
216 views

script to rotate apache weblog

I am looking for a script that would rotate weblogs on apache. I'd like to schedule the script over cron so it could run periodically and rotate access_log and error_log for all websites on the ...
2
votes
2answers
714 views

Script to modify logrotate configuration files?

I'm looking for a script that will allow me to programatically modify logrotate configuration files. At the least I'd like it to be able to replace a block such as /var/log/wtmp { missingok ...
1
vote
2answers
4k views

How to use wildcards within logrotate configuration files

I have the following configuration that is not working: 1) Using rsyslog with Centos 5. 2) Inside /etc/logrotate.d I have the file sj-piers-logs. SJ-PIERS-LOGS: /syslogrep/sjpiers-logs/0* { weekly ...
10
votes
3answers
3k views

Logrotate and Open Files

How does logrotate handle open files? Can logrotate rotate files that a process has open?
11
votes
8answers
3k views

Continuosly monitor logs with tail that are occasionally rotated

We're using tail to continuously monitor several logs, but when a log is rotated the tail for that file will cease. As far as I understand, the problem is that when the log is rotated, there is a new ...