Backup still not inform about problems.

Misiek

Well-Known Member
Feb 23, 2004
116
0
166
cPanel Access Level
Root Administrator
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.
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
23
143
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?
 

Misiek

Well-Known Member
Feb 23, 2004
116
0
166
cPanel Access Level
Root Administrator
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
 

garrettp

Well-Known Member
PartnerNOC
Jun 18, 2004
312
0
166
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.
 

Misiek

Well-Known Member
Feb 23, 2004
116
0
166
cPanel Access Level
Root Administrator
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
 

sirdopes

Well-Known Member
PartnerNOC
Sep 25, 2007
141
0
66
You could also add an exclude file or change the permissions on:

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

Misiek

Well-Known Member
Feb 23, 2004
116
0
166
cPanel Access Level
Root Administrator
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
 

garrettp

Well-Known Member
PartnerNOC
Jun 18, 2004
312
0
166
cPanel Access Level
DataCenter Provider
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
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.
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
Well unfortunatly not the tar.gz archive created for this user is unpackable and any try of untar gives error
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