The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Enable backups only on the dawn

Discussion in 'General Discussion' started by jordanmoreira57, Dec 18, 2010.

  1. jordanmoreira57

    Joined:
    Aug 13, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello,
    I would like to enable full backup generation for clients only from 01:00 to 05:00 am,
    How I could do this?

    I think to rename pkgacct to other name on 05:00 am, and on 01:00 am rename to pkgacct, but I don't know if this possible, or if will work.

    Someone could help me to do this?
     
  2. jordanmoreira57

    Joined:
    Aug 13, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello!
    I do this with:

    Code:
    #!/bin/bash
    
    if grep -q "backup=0" /var/cpanel/features/default
    then
            sed -i "/backup=0/ d" /var/cpanel/features/default
    else
            echo "backup=0" >> /var/cpanel/features/default
    fi
    And added on crontable:
    0 1 * * * /usr/backup
    0 5 * * * /usr/backup
     
Loading...

Share This Page