1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

How do you make a global change for log rotation on all subscriptions/domains?

Discussion in 'Plesk 11.x for Linux' started by plesk_usr, Jan 7, 2013.

  1. plesk_usr

    plesk_usr New Pleskian

    10
    35%
    Joined:
    Oct 19, 2012
    Messages:
    6
    Likes Received:
    0
    Is it possible to change all log rotation settings globally? I tried to configure the log rotation defaults for the reseller account and sync, but it does not change any of the log rotation values.

    Is this possible, or do I need to spend hours and hours clicking on links for hundreds of domains and changing them manually?

    Thanks!
     
  2. MislavO

    MislavO Regular Pleskian

    16
    85%
    Joined:
    Jul 20, 2012
    Messages:
    271
    Likes Received:
    1
    Location:
    Croatia
    I suggest that you change this option on service plan it self and then sync. For those subscription that are locked, you will have to do it manually.

    Because you will change this value on service plan, you won't have to pay attention on this option for future clients.

    Setup this option daily and it will run with daily Plesk crons.
     
  3. RutgerH

    RutgerH New Pleskian

    19
    85%
    Joined:
    Nov 27, 2009
    Messages:
    17
    Likes Received:
    0
    Any suggestions how to change this global, when not using "Service plans" ?
     
  4. plesk_usr

    plesk_usr New Pleskian

    10
    35%
    Joined:
    Oct 19, 2012
    Messages:
    6
    Likes Received:
    0
    It still doesnt change them even when I modify the service plan and sync
     
  5. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,561
    Likes Received:
    1,242
    Location:
    Novosibirsk, Russia
    Disabling log rotation for all domains, for example:

    # for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select name from domains"`; do /usr/local/psa/bin/subscription_settings $i -manage_log false; done
     
  6. plesk_usr

    plesk_usr New Pleskian

    10
    35%
    Joined:
    Oct 19, 2012
    Messages:
    6
    Likes Received:
    0
    Thanks for the reply, but I am actually trying to enable log rotation with specific parameters (rotate daily, max of 31 logs).

    Thanks!
     
  7. plesk_usr

    plesk_usr New Pleskian

    10
    35%
    Joined:
    Oct 19, 2012
    Messages:
    6
    Likes Received:
    0
    I figured it out.

    In the psa database there is a 'log_rotation' table.

    You can make global changes with mysql queries such as:

    Code:
    update `log_rotation` set `compress_enable` = replace(`compress_enable`, 'false' ,'true');
    
     
  8. Juliáng

    Juliáng New Pleskian

    6
     
    Joined:
    Jun 17, 2013
    Messages:
    1
    Likes Received:
    0
    Thank you Bit Poster.

    I update this table with this:

    update log_rotation set turned_on = 'true', period_type = 'by_time', period = 'weekly', max_number_of_logfiles = '4', compress_enable = 'true' ;
     
  9. GhOsTisp

    GhOsTisp Basic Pleskian

    25
    40%
    Joined:
    Dec 15, 2008
    Messages:
    35
    Likes Received:
    0
    how disable error_log on all domains????
     
  10. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,561
    Likes Received:
    1,242
    Location:
    Novosibirsk, Russia
Loading...