Page 1 of 1

/var/log/apache2/error_log

PostPosted: Fri Jun 15, 2012 9:10 am
by akmayuga
hi,

is it safe if i remove all the error logs using WinSCP??
it consume a lot of space in our sda.

please help.

Code: Select all
ipbx:/var/log/apache2 #
access_log               access_log-20120606.bz2  access_log-20120615.bz2  error_log-20120604.bz2  error_log-20120611.bz2
access_log-20120524.bz2  access_log-20120607.bz2  error_log                error_log-20120605.bz2  error_log-20120612.bz2
access_log-20120525.bz2  access_log-20120608.bz2  error_log-20120524.bz2   error_log-20120606.bz2  error_log-20120613
access_log-20120528.bz2  access_log-20120611.bz2  error_log-20120525.bz2   error_log-20120607      error_log-20120613.bz2
access_log-20120531.bz2  access_log-20120612.bz2  error_log-20120526.bz2   error_log-20120607.bz2  error_log-20120614.bz2
access_log-20120604.bz2  access_log-20120613.bz2  error_log-20120528.bz2   error_log-20120608.bz2  rcapache2.out
access_log-20120605.bz2  access_log-20120614.bz2  error_log-20120531.bz2   error_log-20120610.bz2

Re: /var/log/apache2/error_log

PostPosted: Fri Jun 15, 2012 9:48 am
by mcargile
you can safely remove any of the logs that have been bziped (they end with .bz2). That said the system will automatically purge those for you after a while.

Re: /var/log/apache2/error_log

PostPosted: Fri Jun 15, 2012 1:29 pm
by akmayuga
hi mcargile,

thank you for the reply, what about those file that hasn't been in ".bz2" (error_log-20120613,error_log-20120607) and the "access_log". these files consumes almost 30g, can i also delete this file??

regards

Re: /var/log/apache2/error_log

PostPosted: Fri Jun 15, 2012 1:54 pm
by mcargile
access_log and error_log are the active files and should not be deleted. The others can be deleted. The error_log-20120607 and error_log-20120613 are probably the error_log-20120613.bz2 and error_log-20120607.bz2 files uncompressed.

Re: /var/log/apache2/error_log

PostPosted: Fri Jun 15, 2012 2:10 pm
by akmayuga
hi mcargile,

oh i forgot to mention that i also have access_log.bz2 is it ok to delete them as well??

thank you so much....

best regards.. :D :D :D :D :D

Re: /var/log/apache2/error_log

PostPosted: Mon Jun 18, 2012 4:39 am
by DomeDan
Yeah you can remove those files too, though they are good to have if you notice one day that there has been an intrusion and want to go back in the logs to find out more.

You wrote you had almost 30Gb error_log!
take a look at them and try to fix the errors to prevent them from filling up your drive
do a "less error_log" or something, don't use a text-editor on big files

Re: /var/log/apache2/error_log

PostPosted: Tue Jun 19, 2012 7:19 am
by akmayuga
hi guys,

thank you so much....