Older backups not deleted
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.
-
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. 0 -
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. 0 -
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: stat /home/$username/public_html/error_log
Thank you.0 -
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 0 -
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. 0 -
We set permissions as 544 so its readable by everyone but not writable by anyone and it can be executed by owner ($username) only. 0 -
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: stat /home/user/public_html/contributing.md lsattr /home/user/public_html/contributing.md
Thank you.0 -
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:
stat /home/user/public_html/contributing.md lsattr /home/user/public_html/contributing.md
Thank you.
A bit late to the party, However, this is an interesting problem. What permission level would you recommend? Most of us are concern with unintended observation or other malignant attacks. Are you saying that if backups can't be performed. It's the user that changed the permissions? This is the message we got: Cannot stat() file: Permission denied at bin/pkgacct.pl Can you clarify, the best risk mitigation aproach to adjusting permissions, while trying to maintain backups? Thanks,0 -
Your screenshot is really small 0 -
Your screenshot is really small
I don't think that was the question. Perhaps, you are referring to the screenshot at the top of the thread. Here's the question again: Are you saying that if backups can't be performed. It's the user that changed the permissions? This is the message we got: Cannot stat() file: Permission denied at bin/pkgacct.pl Can you clarify, the best risk mitigation approach to adjusting permissions, while trying to maintain backups?0 -
Hello! Generally speaking, most files can have 0644 permissions and most directories can have 0755 permissions. 0
Please sign in to leave a comment.
Comments
11 comments