![](https://seccdn.libravatar.org/avatar/9124252f67757a99ae6a3d1253ec799b.jpg?s=120&d=mm&r=g)
I need to rotate the normal logs in var as well as logs in /var/log/syslogs/ , however, logrotate doesnt seem to be working on the /var/log/syslogs directory. I'm assuming its a syntax error of some kind Below is my logrotate.conf: -- # rotate log files weekly weekly # keep 4 weeks worth of backlogs rotate 2 # create new (empty) log files after rotating old ones create # uncomment this if you want your log files compressed compress # uncomment these to switch compression to bzip2 #compresscmd /usr/bin/bzip2 #uncompresscmd /usr/bin/bunzip2 # RPM packages drop log rotation information into this directory include /etc/logrotate.d /var/log/syslogs/* { daily create rotate 2 compress compresscmd /usr/bin/gzip postrotate killall -1 syslog-ng mv *.gz archive/ endscript } # no packages own wtmp -- we'll rotate them here #/var/log/wtmp { # monthly # create 0664 root utmp # rotate 1 "/etc/logrotate.conf" 43L, 763C -------- Here is the contents of my /var/log/syslogs/ directory: serverA:/var/log/syslogs # ls . 10.116.6.107.1.1 172.20.15.14.1.1.1.1.1.1.1.1 172.20.15.22.1.1.1.1.1.1.1 .. 10.116.6.107.1.1.1 172.20.15.150 172.20.15.22.1.1.1.1.1.1.1.1 10.116.6.106 10.116.6.107.1.1.1.1 172.20.15.150.1 10.116.6.106.1 10.116.6.107.1.1.1.1.1 172.20.15.150.1.1 10.116.6.106.1.1 172.20.15.14 172.20.15.150.1.1.1 10.116.6.106.1.1.1 172.20.15.14.1 172.20.15.22 10.116.6.106.1.1.1.1 172.20.15.14.1.1 172.20.15.22.1 10.116.6.106.1.1.1.1.1 172.20.15.14.1.1.1 172.20.15.22.1.1 10.116.6.106.1.1.1.1.1.1 172.20.15.14.1.1.1.1 172.20.15.22.1.1.1 10.116.6.106.1.1.1.1.1.1.1 172.20.15.14.1.1.1.1.1 172.20.15.22.1.1.1.1 10.116.6.107 172.20.15.14.1.1.1.1.1.1 172.20.15.22.1.1.1.1.1 10.116.6.107.1 172.20.15.14.1.1.1.1.1.1.1 172.20.15.22.1.1.1.1.1.1 serverA:/var/log/syslogs # --- as you can see the logs arent being rotated or compressed in this directory. THANKS! Ryan 18,1 25%
![](https://seccdn.libravatar.org/avatar/72ee3b9e0735cf98a1e936a90fc087ed.jpg?s=120&d=mm&r=g)
On Tue, 2006-04-04 at 16:30 -0500, Ryan McCain wrote:
I need to rotate the normal logs in var as well as logs in /var/log/syslogs/ , however, logrotate doesnt seem to be working on the /var/log/syslogs directory. I'm assuming its a syntax error of some kind
It is a huge number of 1.1.1 endings you have there. Is that really correct? Where is the archive/ directory? You're moving things to a relative path, are you really sure about the current working directory of the script?
/var/log/syslogs/* { daily create rotate 2 compress compresscmd /usr/bin/gzip postrotate killall -1 syslog-ng mv *.gz archive/ endscript
}
as you can see the logs arent being rotated or compressed in this directory.
How can we tell? You're moving the .gz files immediately after rotating to a directory somewhere, and you're telling logrotate to recreate the log file after rotating. As far as I can see, your output of ls is totally normal
participants (2)
-
Anders Johansson
-
Ryan McCain