Deleting Backups from Additional Destinations?

feldon27

Well-Known Member
Mar 12, 2003
122
14
168
Houston, TX
This morning, cPanel Backup backed up about half the accounts on my server and then ran out of disk space. During this process, cPanel Backup did as instructed and uploaded those backups to an Additional Destination (an FTP site at my home). Here's my problem.... cPanel Backup then logged into my home FTP site and DELETED last week's backups.

I've read this documentation a dozen times and I see nothing to indicate that this is the expected behavior:
Retain backups in the default backup directory.

This option retains backups in the default local backup directory, even after the system transfers the backups to another destination.
If this option is not selected, backups will be deleted after being moved to another destination.
Further, I have found no checkbox that lets me tell cPanel to DELETE local backups but PRESERVE remote backups. Is the only option to REVOKE deletion privileges from the FTP account my cPanel server uses to upload files?

Finally, here's the e-mailed report I got from cpbackup:
The system encountered errors during transport of the backup files. Below is a preview of the attached log file.
.
(numerous accounts it failed to backup due to the disk full situation)
.
Unable to prune transport “RemoteFTP”
Error pruning “/weekly/2015-07-10” from “RemoteFTP”: The directory is not empty.
.
This notice is the result of a request from “cpbackup”.
This notice was generated on “Friday, July 17, 2015” at “2:14:06 PM UTC”.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello :)

Here's the general process of how it works:
  • Generation of local backups
  • Transport of local backups to remote destination in queued
  • Local backups are pruned
  • Pruning of backups on the remote destination is queued
To clarify, are you expecting no pruning of backups on the local system when "Retain backups in the default backup directory" is enabled, or are you expecting it to follow the retention period that's configured?

Thank you.
 

feldon27

Well-Known Member
Mar 12, 2003
122
14
168
Houston, TX
Honestly I was expecting the "Retain backups in the default backup directory" setting to only affect LOCAL backups since space is often at a premium. I was not expecting it to do anything to REMOTE backups, since I could write a cron job on that server to prune old backups.

But even if you believe that "Retain backups in the default backup directory" should apply to both local and remote servers, the script should absolutely not prune remote backups until the new backup has been successful!

The backup script failed about 1/3 of the way through the new backups. Then it completely deleted the folder of last week's backups on the remote server. Rule #1 of backups -- don't delete the old backups until you confirm you have new backups.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
The backup script failed about 1/3 of the way through the new backups. Then it completely deleted the folder of last week's backups on the remote server. Rule #1 of backups -- don't delete the old backups until you confirm you have new backups.
Could you open a support ticket using the link in my signature so we can take a closer look at this? You can post the ticket number here so we can update this thread with the outcome.

Thank you.