Recalulate Plesk Statistics

I provide support for web servers running Plesk. Occasionally the backups (Tools & Settings > Backup Manager) will fail when the total size of the web root is greater than the available free backup space. This is normally caused by a customer adding excessive media content, or in this instance, a runaway WordPress backup plugin, generating gigabytes of database files each day.

Identify the website using the command line:

du -sh /var/www/vhosts/*

then find the particular folder using:

du -sh /var/www/vhosts/mydomain.com/*

Files can be deleted using the command line or via Plesk file manager.

If you run the backup at this point it will report (incorrectly) that there isn’t enough disc space.

Plesk invokes the statistics utility (which resides in the ${PRODUCT_ROOT_D}/admin/sbin  directory) to calculate web page access statistics, traffic usage statistics and disk space usage statistics, in the scope of daily maintenance activity.

In order to recalculate statistics for a particular domain, the statistics utility, with option –calculate-one, is used:

/usr/local/psa/admin/sbin/statistics --calculate-one --domain-name=example.com

You May Also Like