Nub help: Backing up & Rotating Apache Log files: linux server

Discussion in '*nix Software' started by jhbball, Apr 4, 2008.

  1. jhbball

    jhbball Platinum Member

    Joined:
    Mar 20, 2002
    Messages:
    2,824
    Likes Received:
    1
    So, I'd like to set up a cron job, that rotates and backs up Apache log files on our web server, but I'm not sure how to set this up. Does anyone have quick instructions as to how to set this up?

    -----------
    Moved to appropriate forum.

    Markbnj - Programming Mod
     
  2. Nothinman

    Nothinman Elite Member

    Joined:
    Sep 14, 2001
    Messages:
    30,672
    Likes Received:
    0
    Most Linux distributions already have a facility called logrotate. If you change the paths where Apache logs you'll have to fix them in logrotate but that's about it.
     
  3. Brazen

    Brazen Diamond Member

    Joined:
    Jul 14, 2000
    Messages:
    4,259
    Likes Received:
    0
    If you installed Apache from a package manager, then logrotate should already be set up. You can open "/etc/logrotate.conf" and add the line: "mail youremail@server.com" to have logrotate email the logs to you. You can also configure logrotate to copy the logs files to a specified location.

    Just google "logrotate" or "man logrotate" for more information.
     
  4. Khyron320

    Khyron320 Senior member

    Joined:
    Aug 26, 2002
    Messages:
    306
    Likes Received:
    0
    Install webmin and use its management tool for syslogs. Very easy and very quick when you are asked to change a setting. You wont have to fumble around much looking for an answer.
     
Loading...