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.

cpbackup runs for > 8 hrs daily -- incremental mode

Discussion in 'Data Protection' started by anup123, May 11, 2005.

  1. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    I run cpbackup in incremental mode just doing daily/weekly backups.
    I find that this (incremental mode) runs for > 8 hrs and this is a pain. I always thought incremental mode is going to be less time consuming.

    Can anyone shed light on this. Not more than 2 GB out of 20 odd GB is changing ... so why should it take so long?

    TIA
    Anup
     
  2. pshepperd

    pshepperd Well-Known Member

    Joined:
    Feb 12, 2005
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    does incremental mode check the files before or after they are tar'd?
     
  3. cguimont

    cguimont Well-Known Member

    Joined:
    Jul 13, 2004
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Incremental check if the folder has been modified and if so.. it checks which files have been modified.. and the it backs them...
     
  4. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    There is no compression in incremental mode.
    It just takes the changed file after previous backup so i thought it would /should have been faster than ftp backup. But no.... it runs and runs for hours and hours :/

    It is a nightmare.

    Thanks
    Anup
     
  5. cPanelBilly

    cPanelBilly Guest

    IT uses the rsync command, so depending on how bigh all the files are it can take many many hours.
     
  6. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    Files are not big ... the only content changing are small email files and would not be more than 2GB max
    I have just always seen pkgacct running and hardly have i seen rsync command running while backups are in progress

    Thanks
    Anup
     
  7. pshepperd

    pshepperd Well-Known Member

    Joined:
    Feb 12, 2005
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    If your connections are fast, and rsync is using archive then it shouldnt take that long.

    I didnt understand at first, but you mean you are just backing up one account like this? Not a whole server of accounts?
     
  8. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    It's entire server

    Anup
     
  9. panayot

    panayot Well-Known Member

    Joined:
    Nov 18, 2004
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    I agree with all that anup123 says. The worst is when backups does not finish untill morning and then as traffic climbs, server eventually gets to a very high load and craches. I notice that there are 3 rsync processes running simultaneously.

    Actually most of the time incremental backup finishes in 2-3 hours. only some days it goes for more than 8 hours. That is strange.

    I was looking for a solution to stop backup at 7 in the morning if it is still running. I am not very good at shell scripting but have this gathered up to now:

    processes that need to be killed:

    root 17592 0.0 0.0 6720 544 ? SN 01:00 0:00 /usr/bin/perl /scripts/cpbackup

    and all occurences of rsync

    here are some possible ways to make a cron job at 7 AM, not sure which to use. I would appreciate help from someone more proficient with this:

    Code:
    kill `ps -ef | grep process | awk '{print $2}'` 
    
    or
    
    kill -9 `ps -aef | grep processes | grep -v grep | awk '{print $2|}'` 
    
    or
    
    'ps -aef | grep  <whatever> | awk '{print $1} | xargs kill -9' 
    
    or
    
    ps -ef | grep [p]rossess | xargs kill -9 
    
    or
    
    for i in `ps -ef |grep <process> |grep -v grep|awk '{print $2}'`
    do
    kill $i
    done 
    Edit: I just thought that the long running rsync may occur when a daily backup is done and immediately after it fires the weekly backup?
     
    #9 panayot, Jun 2, 2005
    Last edited: Jun 2, 2005
Loading...

Share This Page