Logs management and deletion

Home Page Forums Network Management ZeroShell Logs management and deletion

This topic contains 2 replies, has 0 voices, and was last updated by  r1vver 7 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #43013

    r1vver
    Participant

    I have a question about logs management.
    There is “logmanager setip” in Zeroshell gui where i can set remote syslog and auto logs management (auto-compress and auto-deletion of logs using threshold values).
    But how i can make single (non automatic) deletion of all logs? Can it (deletion) be done manually (from cli)?

    #51791

    netman
    Member

    If i were you, I would first try some “basic Linux” commands … like:
    find . -name *.log from the “/” dir.
    You need Shell Access via the Console or via SSH.

    Then I would try to delete some of the logs and see the results …
    Also If I were you, I wouldn’t do anything of the above with a ZS Box that is working with real traffic … try’m on a “test bed ZS box” 😉

    But I’m not you … 😉

    Ciao
    Steve

    #51792

    r1vver
    Participant

    @netman wrote:

    ZS Box that is working with real traffic

    It’s my case.
    The place where logs are stored is known to me, but I do not want to get “mad” ZS box after all rm manipulations.

    #51793

    _dan
    Member

    @r1vver wrote:

    But how i can make single (non automatic) deletion of all logs? Can it (deletion) be done manually (from cli)?

    The answer is yes.
    By default ZS keep current logs on

    /Database/LOG/2011/May/30

    Where

    • Database – the mount point of _DB.001(user database)
    • LOG – log directory
    • 2011 -current year
    • May – current month
    • 30 – current day

    A direct command to remove the logs for current day is

    rm -R /Database/LOG/2011/May/30

    Before you consider deleting the current logs you should backup(compressed) your logs.

    cd /Database/LOG/2011/May/
    tar cjf May30.tar.bz2 30

    Just few basic examples, from here you can start learning about *nix basic commands and shell scripting for other options.

    Success,

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.