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.

backup script

Discussion in 'General Discussion' started by anand, Nov 28, 2003.

  1. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    At present when upcp runs, it also runs the cpbackup script to take the backup of accounts as setup inside WHM. Now this script runs cpuwatch to take care of high cpu loads. This is defined to be max no. of CPU's on the server (my guess). Since i have a single processor on my server, the moment load goes up beyond 1, the backup stops and waits. This is a real probs as lot of times the load if high and backup just sits and wait for hrs together.

    I modified the cpbackup script and made the load to be 5.0 (gud for me atleast), but upcp overwrites it every day.

    Any other solution apart from chattr ?? With chattr, every time upcp runs, it complains, whcih i don't want.

    Is there a way we can setup this backup to run in indivisual mode and then edit it or atleast control on much load the backup sud still go on working ?? Nick a solution please ??
     
  2. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    You could just modify a watchwwwacct script I wrote and call it watchcpbackup.

    See that script in this thread.
     
  3. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Looks nice, thx. I will do this meanwhile we get a permanent solution from cpanel guys.

    We should be able to control till which cpanel backup will keep on working.
     
  4. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    I agree with you. The only problem is, cpanel will never be able to make everything work exactly the way everyone wants it to. It's not possible.

    The day I realised that is the day I started customizing things myself.

    They could provide so many variables and options that we can adjust anything we want, but that would defeat the whole purpose of cpanel, an easy to use interface. It'd still be easy to use for people who know what they're doing, but anyone new to the field would have no idea what to do. ;)
     
  5. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    I agree. But then there can be diff. options level for people. I have 15 servers, even if i use ur solution, everytime changing all of them back is a real pain.
     
  6. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    That's the nice thing about my script. Most of the time, cpanel updates just change the file back to it's original. My script uses a copy of the original and the modified version, compares the modified copy to the actual one, and if it has changed, it then compares the changed one to the copy of the original one. If it finds it was only changed back to the original, it changes it back to the edited version.

    The only time you have to do anything is the rare time when cpanel alters the file you're watching.

    For what you want, there is another option. Just have a script watch that line in the cpbackup file and if it changes, automatically change it back.
     
  7. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    It would be nice if cpanel could be more customizable, but they're working on that. It's more customizable now than it was 2 years ago. :D
     
  8. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    I agree
     
  9. carock

    carock Well-Known Member

    Joined:
    Sep 25, 2002
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    St. Charles, MO
    Any Progress ???

    Has there been any progress to allowing custom CPU load averages for this.

    I got 20 drive mounts and about 30 cpbackup scripts running. Now they are self defeating because the cpbackup scripts that have been waiting for server load to go down are causing it to go beyond 3.0....

    I didn't know my script mods were going to be overwritten each day by upcp, or I wouldn't have wasted my time.

    Since Cpanel doesn't allow the customization of this script, I would like to second the opinion that there should be a user modifiable global variable for that load number in the backup config area. 3.0 is a rediculously low number for some systems. I had a load of 85 on my mail server before it even considered making you wait for things to happen. that was FreeBSD though. I believe RedHat treats load average differently.

    Chuck
     
  10. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    In WHM, Tweak Settings, "The load average above the number of cpus at which logs file processing should be suspended (default 0)". I think this applies to account backups too.
     
  11. spiff06

    spiff06 Well-Known Member

    Joined:
    Jan 17, 2004
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    I'm trying to understand something for some time, and browsing the forums didn't quite answer it. We've been getting server load errors for some time in upcp reports, like:

    Code:
    Fetching [url]http://httpupdate.cpanel.net/cpanelsync/RELEASE/cpanel/version....100%......Done[/url]
    Versions Match! (9.4.1-RELEASE_55).  You are running the latest RELEASE.
    Added Contact [email]cool@me.com[/email],
    Rebuilding Process List...Done
    Scanning.....Done
    Scanning.....Done
    Scanning.....Done
    Scanning.....Done
    Scanning.....Done
    Scanning.....Done
    Scanning.....Done
    Scanning.....Done
    Scanning suexec_log.Done
    Waiting for load to go down to continue
    failed to set permissions on . : Operation not permitted
    What I'm wondering about is whether this could have to do with the backup; basically we have a box with a total of 6 accounts, which we're backing up daily (with diff). In essence, is the backup scheduled by default at the same time as upcp? If so, is there a way to make it happen under separate cron jobs?

    Thanks,
    Eric
     
  12. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Backup is done when the upgrade is finished.

    Here are the last few lines in the upcp script that finish the job:
    Code:
          system("/scripts/enablechkservdwebmail");
          system("/usr/local/cpanel/bin/dcpumon","--killproc");
          system("/usr/local/cpanel/bin/scanfornewmail");
          system("/scripts/fixsuexeccgiscripts");
          system("/scripts/cpbackup");
          exit;
    
     
  13. spiff06

    spiff06 Well-Known Member

    Joined:
    Jan 17, 2004
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    Still trying to get to the bottom of this (newbye :-D).

    Obviously the backup is eating some CPU cycles, which makes the script wait and complain. Now I'm trying to figure out what makes the load go up; is there a log file for cpu-related errors, in addition to the cron message, that I could look at to find out?

    Several other users point to log processing as being the culprit. Our server has Analog, Webalizer & Exim stats daemon checked in the settings.

    The famous load average above the number of cpus at which logs file processing should be suspended is still set at the default zero. I'd like to have a more precise idea of what causes the extra load before changing this value.

    Eric
     
  14. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    tar, gzip, (or rsync, depending on your backup options).
     
Loading...

Share This Page