Results 1 to 2 of 2

Thread: logrotate ignore log directories

  1. #1
    Member
    Join Date
    Dec 2011
    Posts
    52
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Rep Power
    3

    Default logrotate ignore log directories

    Hi

    We have an internal application that writes a lot of log files into a certain directory. In addition it also creates sub directories for each batch job where it puts batch job specific logs. The list of batch job names changes over time so the only option I found is: $APP_BASE_LOGDIR/*/*.log... This was tested and found to be working.

    My problem is that the application developer requires that rotated logs should be put in $APP_BASE_LOGDIR/archive in its original form (cannot compress or modify their format in anyway )...

    My question is: Is there a way I can put a regular expression in the path that will include all sub directories except archive?



    TIA
    Paolo

  2. #2
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,515
    Thanks
    17
    Thanked 814 Times in 511 Posts
    Rep Power
    10

    Default

    Noop. However, you can move archives directory somewhere else (say /root/) using the mv command before rotating logs. Once rotated move back archives directory again to original location. See postrotate...endscript and prerotate...endscript in man page.
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. logrotate file
    By duster in forum CentOS / RHEL / Fedora
    Replies: 3
    Last Post: 8th January 2012, 11:04 AM
  2. Replies: 1
    Last Post: 5th November 2011, 03:07 AM
  3. [Solved] wget Ignore number directory components ( parent directories)
    By mr_manny in forum Shell scripting
    Replies: 2
    Last Post: 22nd October 2009, 10:35 PM
  4. [URGENT..HELP]Please don't ignore my post. =(
    By kzapth in forum Shell scripting
    Replies: 0
    Last Post: 16th September 2007, 06:41 PM
  5. logrotate not working
    By muks in forum Web servers
    Replies: 2
    Last Post: 17th March 2007, 04:50 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •