cPanel backups not being fully removed as per retention

Timmy.S

Member
Aug 20, 2021
5
2
3
Canada
cPanel Access Level
DataCenter Provider
We have configured cPanel Backups, however there are a number of accounts that are not being removed. The system is creating the backup but when the retention policy is run against the files, some of the account are not being removed due to a permission error on the backup.

This is not happening for all accounts but over the time there were enough accounts that filled up our backup Repository and backups began failing. After a manual purge, we we able to manage the logs and see the cause.

The process is having permissions issues with a directory or file and this is leaving the folder behind.

One account is throwing the following error:

cannot chdir to child for /mnt/backup/2021-12-16/accounts/USER_DOMAIN/homedir/public_ftp: Permission denied at /usr/local/cpanel/bin/backup line 2041.
cannot remove directory for /mnt/backup/2021-12-16/accounts/USER_DOMAIN/homedir: Directory not empty at /usr/local/cpanel/bin/backup line 2041.
cannot remove directory for /mnt/backup/2021-12-16/accounts/USER_DOMAIN: Directory not empty at /usr/local/cpanel/bin/backup line 2041.
cannot remove directory for /mnt/backup/2021-12-16/accounts: Directory not empty at /usr/local/cpanel/bin/backup line 2041.
cannot remove directory for /mnt/backup/2021-12-16: Directory not empty at /usr/local/cpanel/bin/backup line 2041.

And since the backups was able to create the folder, i am not sure where to look to see why it is prevented from removing.

Thanks
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
12,499
1,971
363
cPanel Access Level
Root Administrator
Hey there! Are you seeing those entries inside the /usr/local/cpanel/logs/cpbackup log file? If so, I'm not seeing any similar things on my end at this point, so it would be best for our team to examine the server directly. Could you submit a support ticket to our team so we can check this out? If so, please post the ticket number here once you have it so I can follow along.