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.

Way to get monthly cpbackup to run every 28 days?

Discussion in 'Data Protection' started by Man0warr, Aug 23, 2006.

  1. Man0warr

    Man0warr Well-Known Member

    Joined:
    Jun 5, 2006
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Dallas, TX
    Is there a way to get monthly cpbackup to run every 28 days (4 weeks) instead of the 30 it runs at now? Sometimes it will run on a weekday and carries over into the workday which causes unnecessary load, if I could get it to run every 28 days, and start it on like a Sunday, it would run every 4 weeks on Sunday.
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You'd have to take a copy of /scripts/cpbackup, modify it yourself, then run the modified version in the root crontab instead of the proper one.
     
  3. Man0warr

    Man0warr Well-Known Member

    Joined:
    Jun 5, 2006
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Dallas, TX
    I changed all the 29s in the script to 27, maybe that will work.
     
  4. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    That will make it go every 28 days from the last one, until an upcp over-writes the backup script which will happen in less than 28 days.
     
  5. Man0warr

    Man0warr Well-Known Member

    Joined:
    Jun 5, 2006
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Dallas, TX
    Thats what I want it to do, how do I stop upcp from overwriting my changes?
     
  6. gflamerich

    gflamerich Well-Known Member

    Joined:
    Jul 21, 2003
    Messages:
    122
    Likes Received:
    0
    Trophy Points:
    16
    I don't think you can prevent that from happening.
    But you may run a cron after upcp to restore your modifications. We are doing so with a couple of scripts.
     
  7. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    If you know a bit of perl, you can always take my watch wwwacct script and modify it a bit to do the same with your modified cpbackup script.
     
Loading...

Share This Page