• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Disk space usage miscalculated due admin's local server backup

Bitpalast

Plesk addicted!
Plesk Guru
Plesk 12.5.30 #45
CentOS 7.2

Two reproducable issues with miscalculation of disk space when creating locally stored server backups.

Example and steps for reproduction:

Total disk space usage of a customer account is approx. 31 GB including
- files/directories
- databases
- log files
- email

A full local server backup was created by server admin, that adds approx. 20 GB to the customer's subscription, although it was created as a server backup. This is not a subscription backup, but a complete server backup done from the Tools/Settings backup manager for the server. A day afterwards the total size of the customer's subscription is calculcated with approx. 51 GB, because now this locally stored backup is added to this and other customer accounts.

The overusage alarm sets off, because the customer subscription has now exceeded the allowed 50 GB of his subscription. This is the first issue. The locally stored backup created by the server admin should not be added to the customer subscription use, because the customer has no control over backup creation like that. A locally stored full server backup must not count against customer subscription, when the owner of the backup is the server admin.

Now for the second issue: Delete that local backup from the customer's subscription. It no longer appears in the customer's backup list. Expect the statistics to calculate the new total subscription size with 31 GB again.

But satistics re-calculation (https://kb.plesk.com/en/393) still takes the "missing" backup into account, although the customer does no longer have access to this local backup. Manual re-calculation of statistics does not solve the issue. The customer is effectively only using 31 GB and has no chance to find out why his statistics are showing a 51 GB use. The overusage alarm is triggered, too, although the backup is no visible in the subscription.

Tests:
https://kb.plesk.com/en/115085

MariaDB [psa]> SELECT SUM(real_size) FROM domains d WHERE d.id = 533 OR d.webspace_id = 533 ;
+----------------+
| SUM(real_size) |
+----------------+
| 53859005483 |
+----------------+
1 row in set (0.00 sec)

SELECT SUM(httpdocs) + SUM(httpsdocs) + SUM(subdomains) + SUM(web_users) + SUM(webapps) AS `web`, 0 + SUM(mailboxes) + SUM(maillists) AS `mail`, 0 + SUM(dbases) AS `databases`, SUM(anonftp) + SUM(logs) + SUM(domaindumps) + SUM(configs) + SUM(chroot) AS `other` FROM `disk_usage` AS `disk_usage` INNER JOIN `domains` AS `domains` ON domains.id = disk_usage.dom_id WHERE (dom_id = '533') or webspace_id = 533;

MariaDB [psa]> SELECT SUM(httpdocs) + SUM(httpsdocs) + SUM(subdomains) + SUM(web_users) + SUM(webapps) AS `web`, 0 + SUM(mailboxes) + SUM(maillists) AS `mail`, 0 + SUM(dbases) AS `databases`, SUM(anonftp) + SUM(logs) + SUM(domaindumps) + SUM(configs) + SUM(chroot) AS `other` FROM `disk_usage` AS `disk_usage` INNER JOIN `domains` AS `domains` ON domains.id = disk_usage.dom_id WHERE (dom_id = '533') or webspace_id = 533;
+-------------+-----------+-----------+-------------+
| web | mail | databases | other |
+-------------+-----------+-----------+-------------+
| 31494979584 | 350744576 | 51576832 | 21961704491 |
+-------------+-----------+-----------+-------------+
1 row in set (0.00 sec)

Suggestion:
Locally stored backups that are created by system admins must not be counted against customer subscription usage.
 
Absolutely, that did the trick! Thank you! I did not consider that this option even existed.
 
Back
Top