This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Sentora log files getting rather large - okay to delete?
#4
RE: Sentora log files getting rather large - okay to delete?
(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
Reply
Thanks given by: FernandoGarcia


Messages In This Thread
RE: Sentora log files getting rather large - okay to delete? - by americanninja - 04-19-2016, 11:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Is Sentora dead? rajeevrrs 2 3 ,970 12-17-2022, 09:20 AM
Last Post: TGates
Sentora debug and error files johnnyp 0 1 ,589 10-27-2022, 06:16 PM
Last Post: johnnyp
Transfer Account to another Sentora BenI 1 3 ,332 07-21-2022, 07:19 PM
Last Post: Nigel

Forum Jump:


Users browsing this thread: 2 Guest(s)