external backup : email when fails & automatic deletion of older backups ?

Operating System & Version
CENTOS 7.9 kvm
cPanel & WHM Version
92.0.5

trucmuche

Well-Known Member
Nov 20, 2014
92
4
58
cPanel Access Level
Root Administrator
Hello,

I have a VPS running CentOS & WHM/Cpanel, and I have another external account to store backups of VPS accounts.
I configured WHM to backup every account using FTP on that second account and it works perfectly : it stores daily backups on separate folders named /BACKUPS/2020-12-15, /BACKUPS/2020-12-16 and so on. But after some days, of course, the available space runs out.

The first thing I see is that I do not receive an email to tell me that a backup couldn't be fully transferred.
How can I configure WHM to be warned when a backup fails ??

Then, I'm wondering how I could remove the older backup automatically when there is no sufficient space to transfer the backup of the day.

Could you help me ?

Many thanks,

T.
 
Last edited by a moderator:

andrew.n

Well-Known Member
Jun 9, 2020
519
138
43
EU
cPanel Access Level
Root Administrator
Unfortunately cPanel won't be able to remove the backups as it's hosted externally. Make sure you have the correct email set in contact details under Basic WHM Settings.
 

trucmuche

Well-Known Member
Nov 20, 2014
92
4
58
cPanel Access Level
Root Administrator
Can cPanel do something when a FTP error like "452 Transfer aborted. No space left on device" is catched ? If it can execute a script on the external host, I could write a script on the external server to delete the oldest backup...
 

andrew.n

Well-Known Member
Jun 9, 2020
519
138
43
EU
cPanel Access Level
Root Administrator
No, cPanel can't execute anything on the external host unfortunately however upon a failure it should notify you if your contact is set properly.
 

trucmuche

Well-Known Member
Nov 20, 2014
92
4
58
cPanel Access Level
Root Administrator
Ok so... How does people do ? I think I'm not the only one who wants a daily backup of all accounts stored on an external server, and having a good 'rotation' of those backups where oldest are deleted to make available space for the newest ones... How do they do ?
 

trucmuche

Well-Known Member
Nov 20, 2014
92
4
58
cPanel Access Level
Root Administrator
If there is a backup failure we will send a notification, but as @andrew.n mentioned, we can't do anything on the remote side except perform the data move.
Yes OK, I understood that. And I replied : "Ok so... How does people do ? I think I'm not the only one who wants a daily backup of all accounts stored on an external server, and having a good 'rotation' of those backups where oldest are deleted to make available space for the newest ones... How do they do ?"
I can't believe that I'm the only one who wants to store my backups externally...
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,314
538
273
cPanel Access Level
Root Administrator
I understand what you are saying now - thank you for that clarification.

cPanel does prune the remote backups in the same way that it does the local backups. There is not a separate configuration option for that. If that isn't working how you expect it may be best to submit a ticket so we can investigate the backup logs and see where the problem may be.