Questions tagged [logrotate]
72 questions
                    
                    108
                    
            votes
                
                3 answers
            
        logrotate configuration file syntax - multiple wildcard entries possible?
Since the man page doesn't answer my question and I don't want to force a rotation cycle, I decided to ask the question here.
The man page for logrotate gives the following example:
   "/var/log/httpd/access.log" /var/log/httpd/error.log {
      …
        
        0xC0000022L
        
- 7,544
 - 10
 - 54
 - 94
 
                    78
                    
            votes
                
                11 answers
            
        Log rotation of stdout?
I have a Linux program which can write information to stdout and stderr.
I have a shell script which redirects that output to a file in /var/log.  (Via >> and 2>&1.)
Is there a way to make that log file rotate?  (max size, then switch to a different…
        
        Miral
        
- 1,269
 
                    33
                    
            votes
                
                2 answers
            
        How to logrotate with systemd?
I'm running a node app using systemd with a unit file. The apps log can be viewed using journalctl -u example.com but the log gets cut at some point, erasing the history (which I need for debugging). 
How do I configure log rotation with systemd so…
        
        htor
        
- 433
 
                    19
                    
            votes
                
                2 answers
            
        Logrotate no longer reads symlinked configuration file due to non-root ownership
We are currently upgrading from Ubuntu 12.04 LTS to 14.04 LTS on our ruby on rails application servers, and have noticed that the log files are no longer rotating.
On both machines we have a file /var/app-name/config/logrotate owned by our unix user…
        
        phantomwhale
        
- 241
 - 2
 - 6
 
                    12
                    
            votes
                
                4 answers
            
        logrotate unable to rotate logs, getting "No such file error"
logrotate is unable to rotate my logs. I have checked the file permissions, they are fine.
I have even tried by putting "su root root" in the configuration file, still I am facing the same issue.
Please find the relevant details…
        
        Sandeep Singh
        
- 1,582
 
                    5
                    
            votes
                
                2 answers
            
        How to rotate enumerated filenames similar to logrotate?
I have a couple of files, let's say map-0.jpg (newest), map-1.jpg, map-2.jpg, ..., map-9.jpg (oldest). Now my cronjob downloads a new picture from the internet and should save it as map-0.jpg. All other files, however, should be newly enumerated (0…
        
        André
        
- 53
 
                    5
                    
            votes
                
                2 answers
            
        Will cron.daily wait for jobs to finish before starting the next one?
This page http://wiki.ci.uchicago.edu/I2U2/WebalizerConfiguration
suggests renaming /etc/cron.daily/logrotate so it comes after /etc/cron.daily/webalizer - webalizer should be done before logrotate kicks in.
Is that true ? Will cron.daily wait for…
        
        commonpike
        
- 363
 
                    5
                    
            votes
                
                1 answer
            
        LogRotate use regex for filename
I have a custom logging class that creates a log for each instance of the process and adds a unique id to the log file name, example:
process.1234.log
process.1235.log
Also I can add a date/time stamp as well,…
        
        Phill Pafford
        
- 245
 
                    4
                    
            votes
                
                2 answers
            
        logrotate: How to configure and override defaults?
I'm testing a logrotate configuration in /tmp. I'd like 
to configure a default logrotate policy for /tmp/*.log files using my test configuration file /tmp/logrotate.conf 
to handle a particular log file /tmp/special.log with a different policy…
        
        user1011471
        
- 175
 
                    4
                    
            votes
                
                1 answer
            
        logrotate configuration and execution
I'm trying to configure logrotate to rotate and delete log files every day at midnight, but have never used it before. So: (a) I want to confirm that my configuration is correct, and (b) I need help getting on automating its daily execution at…
        
        pnongrata
        
- 2,982
 
                    4
                    
            votes
                
                2 answers
            
        Why the logrotate's bin path is `/usr/sbin`
Why is the logrotate's bin path /usr/sbin on Debian (at least "wheezy”)
knowing that we can actually use it without the root privilege?
        
        JeanCaron
        
- 165
 
                    3
                    
            votes
                
                0 answers
            
        Is there a tool like `cronolog` or `rotatelogs`, but also with compression and removal like in `logrotate`?
I want simple piped logging without config files or system-wide rules for periodic command execution.
Are there any projects that allows to do that? Expecting something like this:
./my_program_that_generate_logs | cronologrotate…
        
        Vi.
        
- 17,755
 
                    3
                    
            votes
                
                2 answers
            
        Merge and view rotated and compressed logfiles
I have a bunch of partly compressed rotated logfiles from a Glassfish application server (using a custom Java logging format):
/tmp/server.log        /tmp/server.log.13.gz  /tmp/server.log.18.gz  /tmp/server.log.23.gz  /tmp/server.log.28.gz …
        
        Wolkenarchitekt
        
- 833
 
                    3
                    
            votes
                
                1 answer
            
        Logrotate olddir with date
it's possible to configure logrotate to create an olddir per day?
I'd like to get the same bash result, like this:
user@blade1022m:~$ date "+%y%m%d"
120208
In /etc/logrotate.conf (pseudo-code):
/home/mhd-01/logs/*.log {
  daily
  missingok
  rotate…
        
        Fabio
        
- 31
 
                    3
                    
            votes
                
                4 answers
            
        Logrotate Error: Unable to open ... for compression
When using logrotate from a cronjob, I am getting this erros:
error: unable to open /var/log/mylog.1  for compression
Does any one know what does it mean and how can I fix it ?
        gkof