Best Practice for Linux Error & Access Log Files
-
Howdy ho
Getting some hefty access logs building up.......and some not so hefty error logs :)
Whats the best practice for keeping these files and for how long?
Is there a way to trim the data, without deleting the file after say a week or so?
I'm not actually sure why I'd need to keep it any longer, apart for looking if a site got hacked (god forbid) or something?
In the mean time, I've got a command that will look for the files and delete in one hit, pretty handy.
Ben.
Posted 1 year ago # -
I would love to know more about this as well. My access log is over 7gigs and thats just 1 over a month. It would be great to have a tutorial on this Guvnr, very helpful for us noobs.
Posted 1 year ago # -
Wow 1 month and no reply,Did some digging around the web and found out to use logrotate. I notice that it is included in the new LEMP script, it wasn't in the original one that I used from here originally. Hope this helps anyone with the same issue.
Posted 1 year ago # -
That's one thing I hate about this site, is that replies are rare if at all. Regardless, I suppose it's still worth it as a good starting point for learning.
Posted 1 year ago # -
OKOK, wrote the damn thing ..
Manage Logs (before they get TOO BIG)
sorry tho .. you're right, have been way busy on .. er, a security book .. pretty much finished and I **will** make up the AWOL to you guys. that's a promise.
hmmn roottoor .. best keep an eye on the logs for you, huh :P (BT4R1 very nice)
Posted 1 year ago #
Reply
You must log in to post.
Want HTML?
a blockquote code em strong ul ol liPlace code between backticks `codeHere`
You've got it.
