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.

Backup still not inform about problems.

Discussion in 'General Discussion' started by Misiek, Jan 13, 2011.

  1. Misiek

    Misiek Well-Known Member

    Joined:
    Feb 23, 2004
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    I set the backup to report if theres error. Here is an example :
    Code:
    Copying homedir.............
    .........
    .........
    .........
    .........
    .........
    .........
    /bin/gtar: ./public_ftp/nawigacja/Copilot 8/CoPilot 8.2.0.218.part2.rar: Cannot open: Permission denied
    .........
    .........
    .........
    .........
    .........
    .........
    .........
    .........
    .........
    .........
    .........
    .........
    /bin/gtar: Error exit delayed from previous errors
    
    One or more files in the home directory were not readable and were not copied. Please review the home directory upon completion of transfer
    
    .........
    .........
    .........
    .........
    .........
    .........
    .........
    .........
    .........
    .........
    .........
    .........
    .........
    .........
    
    Done
    Entering timeout safety mode
    Determining mysql dbs...Saving mysql privs...Done
    
    Backup report comes to my email with topic: Backup complete and there is no information about error.
     
  2. 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
    The cpbackup log file should be attached to the notification e-mail you receive, and the log file is a copy of what is stored on the server in /usr/local/cpanel/logs/cpbackup. Do the notification e-mails not contain the log file as an attachment?
     
  3. Misiek

    Misiek Well-Known Member

    Joined:
    Feb 23, 2004
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    This is part of the log file.
    But when i get a very big log file it's hard to look every time if any backups were made or not.
    I saw option in settings to send info when buckup failes but in this case the backup of the account goes pass the gtar problem and creates wrong tar file writing that everything is ok

    Example account with problems :
    Code:
    Copying homedir.............
    /bin/gtar: ./public_ftp: Cannot savedir: Permission denied
    .........
    .........
    .........
    .........
    .........
    /bin/gtar: Error exit delayed from previous errors
    
    One or more files in the home directory were not readable and were not copied. Please review the home directory upon completion of transfer
    
    Done
    Entering timeout safety mode
    Determining mysql dbs...Saving mysql privs...Done
    ...mysql version: 5.1......mysqldump version: 5.1......Done
    Storing mysql dbs......Done
    Copying cpuser file.......Done
    Copying crontab file.......Done
    Copying quota info.......Done
    Storing Subdomains....
    Done
    Storing Parked Domains....
    Done
    Storing Addon Domains....
    Done
    Storing ssl domain......Done
    Copying password.......Done
    Copying shell.......Done
    Creating Archive ....Done
    pkgacctfile is: /backup/cpbackup/daily/XXXXXX.tar.gz
    md5sum is: c4b3d628722eade9fda3c3adf7c37524
    
     
  4. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    cPanel's backup utility will not die out on individual file (or subdirectory) permission errors, nor should it. Typically these errors are due to files having been uploaded by web scripts and are owned by nobody. Since the backup utility runs as the cPanel user, these files cannot be copied to the backup archive and gtar throws an error. You can prevent this from happening by ensuring proper ownership on all user files.
     
  5. Misiek

    Misiek Well-Known Member

    Joined:
    Feb 23, 2004
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    So You want me to read 4MB file every time when backup is made and look if user did something stupid which eventually will lead to corrupted backup file ? That is not how it should be run. I have to guarantee that backup files are made properly and backup script should warn me if there are any problems.
    This is not normall that for me to be sure that backup is made i have to check every time log file
     
  6. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
  7. sirdopes

    sirdopes Well-Known Member
    PartnerNOC

    Joined:
    Sep 25, 2007
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    You could also add an exclude file or change the permissions on:

    /bin/gtar: ./public_ftp: Cannot savedir: Permission denied
     
  8. Misiek

    Misiek Well-Known Member

    Joined:
    Feb 23, 2004
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Strange You give not universal solution. So if a client do something wrong and gtar bails out i would have to write another script or take actions to clear that case also ? That is bit stupid thing to do, if gtar bails out the backup should be marked as not done for the client and an information should be send not the other way around
     
  9. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    I believe you're mis-interpreting the output. gtar doesn't "bail out;" it simply just skips the file that it cannot package. The rest of the backup process continues as normal.
     
  10. Misiek

    Misiek Well-Known Member

    Joined:
    Feb 23, 2004
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Well unfortunatly not the tar.gz archive created for this user is unpackable and any try of untar gives error
     
  11. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Have you tried correcting the access permissions or ownerships of the files and directories that are failing to be archived?

    What are the exact errors seen when attempting to extract the archive? What command and CLI options are you using when extracting?

    Are you able to generate an account backup manually via root SSH access? Please try the following command, while ensuring to replace "$username" with the actual username of the cPanel account to backup:
    Code:
    # /scripts/pkgacct $username
     
Loading...

Share This Page