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?
#1
Sentora log files getting rather large - okay to delete?
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!
Reply
Thanks given by:
#2
RE: Sentora log files getting rather large - okay to delete?
Use this:

http://forums.sentora.org/showthread.php...=logrotate
[Image: logo2.png]

My being on this forum is all personal and all is done here by me has nothing to with the company Web Improved I work for Smile
Reply
Thanks given by:
#3
RE: Sentora log files getting rather large - okay to delete?
(04-19-2016, 05:44 PM)bbspike Wrote: Use this:

http://forums.sentora.org/showthread.php...=logrotate

Thanks BBspike! Actually, I came across several issues with the configurations on that page. After testing things, I finally got everything working. I will post here shortly for anyone else looking for this answer.
Reply
Thanks given by:
#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


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

Forum Jump:


Users browsing this thread: 1 Guest(s)