(04-19-2016, 12:53 AM)americanninja Wrote: So I have noticed my server is starting to accumulate a good amount of diskspace. So I was searching around the server today to see what folders were getting bloated and I came across /var/sentora/logs folder. It seems that the content in the folder /var/sentora/logs/domains is taking up around 3.5 GB of space.
Currently this web server is simply hosting about 6 websites with a total of 5.4GB of disk space being used.
How can I reclaim the 3.5 GB in the logs folder. Does Sentora clear this automatically or do I need to go in and delete. Is it safe to just delete the entire /var/sentora/logs/domains folder?
Looking forward to any help. Thank you!
So I referred to the other commentors thread to get an idea of what I had to do. Some of the code seemed to have issues with Ubuntu and the permissions. I have installed Sentora by default on a server with version 1.0 on ubuntu. So if you have Ubuntu and having trouble with the other thread, please have a look at the config code I used on my server.
Code:
nano /etc/logrotate.d/Sentora-apache
Then paste this in the file:
Code:
/var/sentora/logs/domains/*/*access.log /var/sentora/logs/domains/*/*bandwidth.log /var/sentora/logs/domains/*/*error.log /var/sentora/logs/zpanel.log /var/sentora/logs/sentora*.log /var/sentora/logs/daemon*.log {
su root root
weekly
size 100M
missingok
rotate 2
compress
delaycompress
notifempty
create 664 root root
sharedscripts
postrotate
/etc/init.d/apache2 reload > /dev/null
endscript
}
Code:
nano /etc/logrotate.d/Sentora-dovecot
Paste this in the file:
Code:
/var/log/dovecot*.log {
su root root
weekly
size 100M
missingok
rotate 5
compress
delaycompress
notifempty
create 660 vmail mail
sharedscripts
postrotate
doveadm log reopen
endscript
}
Code:
nano /etc/logrotate.d/Sentora-proftpd
Code:
/var/sentora/logs/proftpd/access.log /var/sentora/logs/proftpd/auth.log /var/sentora/logs/proftpd/xferlog.www {
su root root
weekly
size 100M
missingok
rotate 5
compress
delaycompress
notifempty
create 644 root root
sharedscripts
postrotate
# reload could be not sufficient for all logs, a restart is saf$
/etc/init.d/proftpd force-reload > /dev/null
endscript
}
This should work on Ubuntu with Sentora v1.0. Be sure to check if the file creation lines specifying permissions owner and group are correct. Refer to the files in that folder to make sure they match.
To confirm things are working run logrotate command like this:
Code:
logrotate -v /etc/logrotate.d/nameof-file
You should see new files in the directory if they were rotated. Then you can check to see if was rotated here as well:
Code:
cat /var/lib/logrotate/status