Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Daily Backup Stopped Working

Discussion in 'General Discussion' started by jonwatson, Nov 16, 2007.

  1. logikstudios

    logikstudios Well-Known Member

    Joined:
    Nov 2, 2006
    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    166
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelKenneth

    cPanelKenneth cPanel Development Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,574
    Likes Received:
    47
    Trophy Points:
    308
    cPanel Access Level:
    Root Administrator
    The changes made to cpbackup solves a lot of problems with race conditions, prolonged backups and process control.

    The backup is actually running. All output now goes to the log indicated in the email.

    We are working on functionality (no ETA) to send either the log, or a comprehensive report, to the Server contact address.

    As for those who are seeing backups start immediately upon changing the configuration, we are unable to reproduce this behavior in our testing environment. If you can reliably reproduce this behavior, please open a support ticket at https://tickets.cpanel.net/submit/ Address it ATTN: QA

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    944
    Likes Received:
    19
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    The problem with this new system is that it doesn't email you when the backup process is finished. We backup to a local backup drive and then rsync to a remote backup server when we know the local backup has been completed, but now we have to check by other means if cpbackup has finished :(
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Mat-d-rat

    Mat-d-rat Well-Known Member

    Joined:
    Jul 30, 2003
    Messages:
    105
    Likes Received:
    2
    Trophy Points:
    168
    I'm quite happy for the log to be stored on the server, but I'd rather have an email that says "Backup completed sucessfully on blha blah, log file XXX"/or "The backup did not complete, please check the logs" rather than just complete log at xyz. If my backup runs fine I'm happy, really I only want to be logging in to my server and checking logs when there is an issue.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. DaveT

    DaveT Active Member

    Joined:
    Aug 20, 2004
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    151
    This is exactly the process that I use too on a number of cPanel servers. I really need that full-log email functionality back. Simply getting an email that says "it's started, check this or that file" tells me very little. Notwithstanding the issues that the new cpbackup has apparently fixed, it feels like removal of the full-log email might have been a step too far...

    Dave.
     
  6. Chocobo22687

    Chocobo22687 Member

    Joined:
    Oct 23, 2006
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    151
    My understanding is the email isn't telling you that its finished successfully, its just telling you that the backup process started successfully - now check your log to see if its ok or not.

    Would rather get everything to email personally... much less effort every morning to know that the servers infact had a clean backup
     
  7. tolra

    tolra Active Member

    Joined:
    Mar 4, 2006
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    151
    Well this change really messed us up as we were automatically running rsync, this change resulted in us copying partial data. We've spent this morning working through all the servers manually running backup to ensure that we have a good working copy.
    Having to login to each server each morning, then find and check the log really is another job we don't need, therefore once I stopped calling cPanel names, I came up with the following script.

    It waits for cpbackup to end then shows all the log files before deleting them, assuming it's added to cron and starts after cpbackup it now emails the results as before.

    It's not elegant but seems to work for us. Use of this is completely at your own risk!

    waitoncpbackup.sh
    Code:
    #!/bin/sh
    
    wait_on_backup() {
    
            ## Loop forever
            while :
            do
                    ## Get cpbackup pid
                    waitpid=`/usr/bin/pgrep -u 0 -f "/scripts/cpbackup"`
    
                    ## If not running exit
                    if [ -z "$waitpid" ] ; then
                            return
                    fi
    
                    ## Sleep before testing again
                    sleep 300
            done
    }
    
    ## Wait for cpbackup to finish
    wait_on_backup
    
    ## Output the logs
    echo '---------- cpbackup log start ----------'
    
    for filename in /usr/local/cpanel/logs/cpbackup/* ; do
            echo
            echo "$filename"
    
            ## Get and output the file
            echo "`cat $filename`"
    
            ## Remove log
            rm -f $filename
    done
    
    echo
    echo '---------- cpbackup log end ----------'
    
    Add an entry to cron to run after cpbackup has started.

    If/when cPanel get to a point where they can email the logs then it's easy enough to delete this.
     
    #27 tolra, Dec 23, 2007
    Last edited: Dec 24, 2007
  8. DaveT

    DaveT Active Member

    Joined:
    Aug 20, 2004
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    151
    Maybe this will help...

    Hi,

    I've found that a slightly more elegant solution is to use the postcpbackup functionality. If /scripts/postcpbackup exists and is executable it will get run once the cPanel backup has completed. I've written such a script that's along the lines of the following...

    Code:
    #!/bin/bash
    cat /usr/local/cpanel/logs/cpbackup/*.log | mail -s "Backup report" yourname@domain.com
    rm /usr/local/cpanel/logs/cpbackup/*.log
    I know that its very basic, but it seems to give me the desired results - the first time it's run it'll generate an email containing all of the previous logs that are in /usr/local/cpanel/logs/cpbackup but subsequently it just generates a mail containing the latest log.

    Dave.
     
  9. cPanelKenneth

    cPanelKenneth cPanel Development Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,574
    Likes Received:
    47
    Trophy Points:
    308
    cPanel Access Level:
    Root Administrator
    If you check out the change log for the latest EDGE build, you'll notice we made some changes to backup notification.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. DaveT

    DaveT Active Member

    Joined:
    Aug 20, 2004
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    151
    Thanks Kenneth - that looks exactly what the doctor ordered :) - just have to wait for it to get into Stable now...

    Dave.
     
  11. BeDazzler

    BeDazzler Member

    Joined:
    Feb 20, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    Australia
    cpbackup changes / backup not working

    Very annoying. I have just come back from overseas to find that our backups have not been working since the cpanel backup script update.

    We have been sitting on a potential risk if our shared hosting box went down.

    Can you please let customers know before you do these things - via something a little more detailed than a line item in a change log doco that we may not be able to read prior to the change.

    Scripts now written so we can watch the logs.
     
  12. Bdzzld

    Bdzzld Well-Known Member

    Joined:
    Apr 3, 2004
    Messages:
    391
    Likes Received:
    4
    Trophy Points:
    168
    I totally agree. cPanel has always been very sparse in supplying information about what exactly has been changed in a newer version and what bugs have been fixed.
     
  13. sebby

    sebby Well-Known Member

    Joined:
    Jun 15, 2004
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    156
    Would you be willing to thare this script while we are all waiting for a patch by cPanel?

    Seb
     
  14. sebby

    sebby Well-Known Member

    Joined:
    Jun 15, 2004
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    156
    Did anyone find a solution to get our daily backup logs emailed as it used to?

    S
     
  15. Rashad

    Rashad Member

    Joined:
    Jan 13, 2008
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    51
    cpbackup running in the background.


    Hi everyone!

    am getting this every night, a cpbackup mail containing:

    cpbackup running in the background.
    complete log:/usr/local/cpanel/logs/cpbackup/xxxxx.log

    How can I enable the verbose log via email again?

    Thanks a lot,
     
  16. cPanelNick

    cPanelNick Administrator Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,486
    Likes Received:
    31
    Trophy Points:
    158
    cPanel Access Level:
    DataCenter Provider
    Full logs are sent again in the latest EDGE & CURRENT builds. You can disable them in the contact manager once you install one of these builds.
     
  17. opt2bout

    opt2bout Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    64
    Likes Received:
    1
    Trophy Points:
    158
    We're not getting any backup activity since Current C19353. We can run the cpbackup script manually, and it completes okay, and it has been attaching a log file to the Email notification.
     
  18. cPanelKenneth

    cPanelKenneth cPanel Development Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,574
    Likes Received:
    47
    Trophy Points:
    308
    cPanel Access Level:
    Root Administrator
    Please open a support ticket at https://tickets.cpanel.net/submit/ Mark the subject ATTN: QA Backup

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. logikstudios

    logikstudios Well-Known Member

    Joined:
    Nov 2, 2006
    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    166
    Your saying for us to open a ticket for this issue, Is Cpanel doing anything to fix this? EG release a release version that fixes this issue soon.

    Cheers,
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. cPanelKenneth

    cPanelKenneth cPanel Development Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,574
    Likes Received:
    47
    Trophy Points:
    308
    cPanel Access Level:
    Root Administrator
    The behavior described by opt2bout is not manifesting in our tests. By requesting opt2bout open a support ticket we can determine the variance between the test environment and the production environment used by opt2bout, which may be indicative of environments on other servers. This enables us to improve the tests and testing environment to more closely match 'real world' cases. It also allows us to determine the cause of the issue at the source, thereby facilitating resolution to the problem, not just for opt2bout, but for those with like environments and circumstances.

    It is for these reasons I requested opt2bout mark the ticket ATTN: QA Backup.

    A build, or release, of the Release branch is separate from this request and discussion thereof.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice