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.

Weekly and mothly backups does not work

Discussion in 'General Discussion' started by Sergiu Tot, Apr 17, 2008.

  1. Sergiu Tot

    Sergiu Tot Well-Known Member

    Joined:
    Jul 17, 2007
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Cluj, Romania
    cPanel Access Level:
    Root Administrator
    Hello !

    It seems that the weekly and monthly backups do not work, even if they are activated in WHM. Does anyone have an and ideea what could be the cause ? Is it possible to be the OS (FreeBSD 6.2) ?
     
  2. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    None of our freebsd 6.2 boxes work with the weekly and monthly settings but our Centos boxes are fine. We do our own kind of backups on the freebsd machines so we can live with the cpanel daily backups, but I am not sure why the weekly/monthly does not work.
     
  3. Sergiu Tot

    Sergiu Tot Well-Known Member

    Joined:
    Jul 17, 2007
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Cluj, Romania
    cPanel Access Level:
    Root Administrator
    The problem is (hopefuly) solved. I opened a ticket it seems that they know about it, only that the issue is fixed only on EDGE. The one who answered me was kind enough to fix it for me without upgrading cPanel to EDGE.
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,460
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The fix is rather straight foward. When executed via cron, if no PATH is setup by the system admin, or script writer, then a default PATH is used, which on FreeBSD is:

    Code:
    /bin:/usr/bin
    
    cpbackup was, for quite a while, simply calling the system tools, such as rsync, without specifying the full path to the binary. On FreeBSD, these are often in /usr/local/bin.

    The simple fix is to add /usr/local/bin to the $ENV{'PATH'} statement near the top of the script, like:

    Code:
    $ENV{'PATH'} .= ":/sbin:/usr/local/bin";
    

    The fixed version that is in EDGE doesn't do that, rather it looks up the actual path to the binary and uses the full path when calling it. There are also a number of other fixes in the EDGE version which make it non-portable to non-EDGE setups.

    Due to the path issues, the script works fine when called manually, but would never perform the rsync to weekly and monthly when called via cron.

    By the way, please feel free to open support tickets specific to FreeBSD as we are striving to improve our support of that platform. Our primary target platform is Linux, which uses SysV semantics and doesn't always translate well to a BSD platform.
     
  5. LinuxStandard

    LinuxStandard Active Member

    Joined:
    Jan 22, 2008
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    I am glad to see this finally fixed. I had been hunting for the solution to this problem for years without any success. Hopefully this will fix the backup issues on FreeBSD once and for all. :D
     
Loading...
Similar Threads - Weekly mothly backups
  1. Brian Johnson
    Replies:
    3
    Views:
    263

Share This Page