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.

Are there any alternative scripts to Cpbackup?

Discussion in 'Data Protection' started by AdamDresch, Jan 23, 2009.

  1. AdamDresch

    AdamDresch Well-Known Member

    Joined:
    Jun 22, 2006
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    While the basic CPanel backup script works, it is somewhat limited

    Ideally it'd be great if there was an option to preserve X number of daily/weekly/monthly backups, instead of the system overwriting the existing ones

    Anyone know of a line of code/ing or script which can facilitate that?
     
  2. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    There was another one on the forums, search for a smarter backup script. We quit using it when it the updates for it stopped, but if it might suit your needs.
     
  3. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    I've done one; you need to put a script in /scripts/postcpbackup. If interested let me know...
     
  4. lorio

    lorio Well-Known Member

    Joined:
    Feb 25, 2004
    Messages:
    243
    Likes Received:
    3
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    What are you using now?
     
  5. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    Just the standard cPanel backup.
     
  6. AdamDresch

    AdamDresch Well-Known Member

    Joined:
    Jun 22, 2006
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    Thanks, yea that's the first one I looked up, but it's no longer available.
     
  7. danielmolano

    danielmolano Registered

    Joined:
    Feb 8, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    re

    are you using wordpress? if so they have a few plugins that will backup everything up..and if not then I'm sorry I dont know..all I know is wordpress.
     
  8. Voltar

    Voltar Well-Known Member

    Joined:
    Apr 30, 2007
    Messages:
    269
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Bakersfield, California
    I believe that R1soft has integration with cPanel, but it's a little pricey.
     
  9. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    You could just write a simple script to copy the files to a different location every night after backup has ran. Not a great way but it could solve your problems. You could rename the old folder before copying the new backups, something along those lines.
     
  10. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    This script is the one I mentioned previously, it works along similar lines to what rhenderson has suggested.

    To make it work, you copy it into /scripts/postcpbackup and it is run after a backup completes successfully. The script rotates daily, weekly and monthly copies keeping N copies of each. You can specify N separately for daily, weekly and monthly through keepdaily/keepweekly/keepmonthly variables, and no copies are made if those variables are set to empty or not set. For instance, the following would keep two copies of daily backups and 3 weeks of weekly and no monthly backups:
    Code:
    keepdaily=2
    keepweekly=3
    keepmonthly=
    
    You can put these settings in the script itself or in a file /backup/cpbackup/.postcpbackup

    For the script, see www.whitedoggreenfrog.com/scripts - it's the top paragraph at the moment, postcpbackup...
     
  11. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    ps: if you use and like it, could you post here; also if it has bugs, let us know.

    The version I have up at the moment uses "tac" but I can change it to use ls -tr instead, just haven't got around to doing it and testing it ...
     
  12. britsenigma

    britsenigma Well-Known Member

    Joined:
    Dec 14, 2008
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    6
    I'm gonna test it out.

    First thing I noticed is, if you have your backup folder in another location, you need to make a change to the CD command.

    I inserted a variable at the top, although it would be nice if I could pull that variable fromwhere cpanel saves the tweaks data.
     
Loading...

Share This Page