Nov 30, 2017
5
0
1
india
cPanel Access Level
Root Administrator
Hi

I have configured backup system to maintain 3 daily and 2 monthly backups, but when backup cron runs its not deleting older backups and I have to manually delete older backups after every few days to free up disck space, I have attached screenshot of my backup configuration page.
 

Attachments

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

Can you review the most recent backup log in the /usr/local/cpanel/logs/cpbackup/ directory and let us know if you notice any error messages during the backup process?

Thank you.
 
Nov 30, 2017
5
0
1
india
cPanel Access Level
Root Administrator
as far as I can see the backups are generated fine if disk space is available, and I see some errors like permission denied a sample error is given below:

/home/freebizm/public_html/error_log: Cannot open file: Permission denied at bin/pkgacct.pl line 1474.
[2018-04-03 07:36:36 +0530] /home/freebizm/public_html/contributing.md: Cannot open file: Permission denied at bin/pkgacct.pl line 1474.
[2018-04-03 07:36:36 +0530] /home/freebizm/public_html/fonts: Cannot open file: Permission denied at bin/pkgacct.pl line 1474.
[2018-04-03 07:36:36 +0530] /home/freebizm/public_html/.htaccess: Cannot open file: Permission denied at bin/pkgacct.pl line 1474.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

Can you check the permission and ownership values of the files referenced in the logs to ensure the backup process is able to package them? It's likely the files are owned by another user, or set to read-only permissions. EX:

Code:
stat /home/$username/public_html/error_log
Thank you.
 
Nov 30, 2017
5
0
1
india
cPanel Access Level
Root Administrator
Yes file permissions are set to read only, this is done to increase security of websites from hackers, but I think backup process is performing read operations only for the files, and files are publicly readable but not writable by anyope, also the location where backup is stored is writable thats why it can write the backup files
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

Backups run as the account username when generated, and thus need to be able to access those files or the backup process will fail. Can you verify the specific permissions assigned to those files?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

0544 permissions shouldn't prevent the backup process from including a file in the archive. Can you run the following commands for one of the affected files and let us know the output? EX:

Code:
stat /home/user/public_html/contributing.md
lsattr /home/user/public_html/contributing.md
Thank you.