Backup pruning behavior in cPanel 60

cPanelMichael

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

I've opened an internal case to note this concern. I'll update this thread with more information as it becomes available.

I have same problem. Please fix it.

[2016-12-04 21:48:33 +0300] info [backup] Final state is Backup::PartialFailure (0)
[2016-12-04 21:48:33 +0300] info [backup] Sent Backup::PartialFailure notification.

[2016-12-04 02:04:59 +0300] Copying SSL certificates, CSRs, and keys...[2016-12-04 02:04:59 +0300] warn [pkgacct] Failed to write the cache file “/home/delaemva/ssl/ssl.db.cache” (Cpanel::Exception::IO::CloseError/(XID 7bnwvg) Системе не удалось закрыть дескриптор файла для «/home/delaemva/ssl/ssl.db.cache.tmp.39861624» из-за следующей ошибки: Disk quota exceeded
The system failed to close a file handle for “/home/delaemva/ssl/ssl.db.cache.tmp.39861624” because of the following error: Disk quota exceeded
Could you verify if increasing the disk space on that account, or excluding it from backups, addresses the issue? If not, and if there are no additional failures, feel free to open a support ticket using the link in my signature so we can take a closer look.

Thank you.
 

NanoGame

Member
Oct 6, 2016
5
6
53
Russia
cPanel Access Level
Root Administrator
Could you verify if increasing the disk space on that account, or excluding it from backups, addresses the issue? If not, and if there are no additional failures, feel free to open a support ticket using the link in my signature so we can take a closer look.
These account has excess disk space. I have excluded from a copy of all such accounts will be watching.

You will be able to solve the problem of cleaning backups if there are accounts that exceed the disk space? Previously, it was not a problem. The server is used for virtual hosting, we can not just add disk space to users or delete files.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
You will be able to solve the problem of cleaning backups if there are accounts that exceed the disk space? Previously, it was not a problem. The server is used for virtual hosting, we can not just add disk space to users or delete files.
The internal case referenced above is open to evaluate how backups are pruned. As of now, no backups are pruned if a single account fails or partially fails. The feedback we are receiving is that pruning should only be skipped for the accounts that fail instead of for all accounts on the system. For reference, the case number is CPANEL-10331. I'll update this thread with more information on the status of this case as it becomes available.

Thank you.
 

NanoGame

Member
Oct 6, 2016
5
6
53
Russia
cPanel Access Level
Root Administrator
I tried to disable backups for users who have exceeded the disk space, but as long as the backup was done, the disk space has been exceeded from other users ... Older copies of the newly retired not because of it. When the server 1000+ accounts, this was not to follow.

If you can not return the old way of working backups, you need to somehow modify the current mode, so that it left only archive clients, backed up fails, the successful and cleaned up in the last days.

Thank you, I will wait for correction.
 

erazmus

Registered
Aug 22, 2008
1
0
51
The internal case referenced above is open to evaluate how backups are pruned. As of now, no backups are pruned if a single account fails or partially fails. The feedback we are receiving is that pruning should only be skipped for the accounts that fail instead of for all accounts on the system. For reference, the case number is CPANEL-10331. I'll update this thread with more information on the status of this case as it becomes available.

Thank you.
Any updates on this?
 

cPanelMichael

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

CPANEL-10331 was published with cPanel version 62.0.2:

Fixed case CPANEL-10331: Turn up noise level when pruning not done.

This will add a warning message to the backup logs when pruning is not performed to help ensure administrators are notified when this happens. The case is also scheduled for inclusion with a future build of cPanel version 60.

There's no additional functionality at this time that will change the backup pruning behavior. The recommended action at this time is still to review the logs to determine why backups failed for an account and to proceed to address the individual issues resulting in the backup failures.

To note, there are plans to add a feature in cPanel version 64 that would allow an admin to decide the pruning behavior of old backups when accounts fail to backup.

Thank you.
 

cPanelMichael

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

To update, CPANEL-10331 is now included with cPanel version 60:

Fixed case CPANEL-10331: Turn up noise level when pruning not done.

Thank you.
 

cPanelMichael

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

Here's a screenshot of an additional option under "WHM >> Backup Configuration" in cPanel 64 to help prevent disk space reaching capacity:

backups.png

I'll provide more information about an additional feature related to the backup pruning behavior when one or more backups fail once it's released.

Thank you.
 

monarobase

Well-Known Member
PartnerNOC
Jan 26, 2010
521
13
68
France
cPanel Access Level
Root Administrator
Haveing just read though this topic, it looks like you are trying to fix the symptoms without fixing the cause of the problem.

Can't you either allow root users to ignore failures due due ssl certs backup, or find a way to prevent SSL certificates from failing (detect this specific error and force the ssl process to close) ?

cPanel mustn't forget that everything needs to work without manual admin intervention. Some webhosts have lots of accounts and lots of servers and everything is not always black or white. I'm sure most hosts don't want you not to prune a users backups because he is over quota and a tempory ssl db file can't be backed up.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Can't you either allow root users to ignore failures due due ssl certs backup, or find a way to prevent SSL certificates from failing (detect this specific error and force the ssl process to close) ?
Here's an example of the error message you are referring to:

The system failed to close a file handle for “/home/username/ssl/ssl.db.cache.tmp.12345678” because of the following error: Disk quota exceeded
If the backup system were to ignore this error message, then it would result in the generation of an incomplete backup archive. I recommend creating a feature request for the ability to prevent accounts from using more than $X percentage of the their available disk space quota if you'd like to see a feature that prevents accounts from reaching their disk space limit:

Submit A Feature Request

Thank you.
 

monarobase

Well-Known Member
PartnerNOC
Jan 26, 2010
521
13
68
France
cPanel Access Level
Root Administrator
Do you mean that backups that just backup that user's files and databases are incomplete ?

Lots of webhosts backup with Rsync or R1Soft. Both of these just backup the files.

I fail to see why an account over quota cannot be backed up and why this backup wouldn't be complete.
 
  • Like
Reactions: musti19

cPanelMichael

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

During the backup process, /scripts/pkgacct runs as the account username when packaging the account, and thus the process can fail if the account has exceeded it's quota. Temporarily granting more space to an account to allow a backup to complete is a change to the existing design of the backup system, and thus a feature request is recommended for such a change.

Thank you.
 

cPanelMichael

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