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 - no backups - thinks backups are up to date

Discussion in 'Data Protection' started by santrix, Oct 28, 2010.

  1. santrix

    santrix Well-Known Member

    Joined:
    Nov 30, 2008
    Messages:
    223
    Likes Received:
    2
    Trophy Points:
    18
    Hi,

    I noticed on one of my servers that the cpbackup process didn't fire off it's usual completion email...

    When I looked at the log file in

    /usr/local/cpanel/logs/cpbackup/*.log

    All it said was:

    [cpbackup] Started at Thu Oct 28 01:00:01 2010
    [cpbackup] Daily Backup is up to date.
    [cpbackup] Completed at Thu Oct 28 01:00:01 2010

    The last backup to run was 24hrs earlier. This is a shared hosting server so plenty of changes to user accounts requiring backup! Any ideas why cpbackup would do this?

    I just ran /scripts/cpbackup from shell and it did the same again, with the same entries in a new log file.

    Help!
     
  2. santrix

    santrix Well-Known Member

    Joined:
    Nov 30, 2008
    Messages:
    223
    Likes Received:
    2
    Trophy Points:
    18
    Found the answer... apparently cpbackup checks the date/time of the backups directory - in this case /backup/cpbackup/daily

    If the access date is the same as the currently run backup then it will skip.

    This happened because I had removed some stake backups yesterday, and in doing so updated the directories access times.

    touch -d 00:00 /backup/cpbackups/daily

    and then re-ran /scripts/cpbackup and it ran fine.
     
  3. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    This is correct

    As you observed, cpbackup does check the timestamps on files and directories when deciding whether to back them up or not. If the timestamps are newer than the designated interval (daily, weekly, monthly), then the files and/or directories will not be backed up.
     
  4. tuxer

    tuxer Member

    Joined:
    Jan 8, 2010
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    we run backups on sunday and is retained on the weekly/ directory. Is there any way to run cpbackup cron (set via cpanel - backup option ) even if the time stamp is less than 6 days on weekly/ ?

    This is because techs might work on the files in weekly/ causing the dates to get updated.
     
  5. Indianets

    Indianets Well-Known Member

    Joined:
    Jun 13, 2008
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Simple ==> Change it to Daily and tick 'Sunday' only :D

    Complex ==> Add a cron just before the cpbackup cron to change the date time of weekly dir.

    - Vijay
     
    #5 Indianets, Jan 14, 2011
    Last edited: Jan 14, 2011
Loading...

Share This Page