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.

Different backup method?

Discussion in 'Data Protection' started by jhyland87, Jun 11, 2009.

  1. jhyland87

    jhyland87 Well-Known Member

    Joined:
    Dec 8, 2008
    Messages:
    153
    Likes Received:
    0
    Trophy Points:
    16
    I wanted to know if its possible to modify the backups in a way that if the site is no longer on the server, the backup files will be deleted.

    Can I make it like.. delete the daily, THEN do the backup?
     
  2. jhyland87

    jhyland87 Well-Known Member

    Joined:
    Dec 8, 2008
    Messages:
    153
    Likes Received:
    0
    Trophy Points:
    16
    I saw this
    PHP:
    if ( $CONF{'PREBACKUP'} && -'/scripts/precpbackup' && -x _ ) {
        print 
    "[cpbackup] Executing user defined pre backup script (/scripts/precpbackup).\n";
        
    system '/scripts/precpbackup';
    }
    In the cpbackup.... That doesnt exist, if I make it, will it run before the backup?
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Creating /scripts/precpbackup, yes - if created, it will run before the backup generation begins.

    Here's a link to all post- scripts that can be created for a cPanel/WHM environment:

    ScriptHooks < AllDocumentation < TWiki

    Also, for every post- script, you can also create a pre- script.
     
  4. jhyland87

    jhyland87 Well-Known Member

    Joined:
    Dec 8, 2008
    Messages:
    153
    Likes Received:
    0
    Trophy Points:
    16
    Thats awesome, how about switching the method to scp from ftp?
     
  5. jhyland87

    jhyland87 Well-Known Member

    Joined:
    Dec 8, 2008
    Messages:
    153
    Likes Received:
    0
    Trophy Points:
    16
    I created /scripts/precpbackup With this in it

    PHP:
    #!/bin/bash
    rm -rf /backup/cpbackup/daily/
    mkdir /backup/cpbackup/daily/
    exit 
    0
    Didnt do a damn thing.. any idea?
     
  6. jhyland87

    jhyland87 Well-Known Member

    Joined:
    Dec 8, 2008
    Messages:
    153
    Likes Received:
    0
    Trophy Points:
    16
    bump? Still stuck
     
  7. jhyland87

    jhyland87 Well-Known Member

    Joined:
    Dec 8, 2008
    Messages:
    153
    Likes Received:
    0
    Trophy Points:
    16
    Goin with r1soft
     
  8. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hmm, I recommend submitting a support ticket so we can diagnose this: http://tickets.cPanel.net/submit
     
  9. jhyland87

    jhyland87 Well-Known Member

    Joined:
    Dec 8, 2008
    Messages:
    153
    Likes Received:
    0
    Trophy Points:
    16
    well I kinda see whatsup, the PREBACKUP needs to be added to the backup config, AND have a value... I think -1 means off... so does 1 mean on? Didnt do it.
     
  10. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I spoke with some of our technical analysts and they recommended submitting a support ticket so we can determine why the backup script isn't working on your server.
     
Loading...

Share This Page