Script to list Backup Disk Usage in Plesk

I recently handled a case where customer wanted to know all of his available backups and the disk usage of those backups. The script I used in this situation is given below.

Script to list Backup Disk Usage in Plesk

if [ -d /var/lib/psa/dumps/domains ]; then echo -ne "nn=== PLESK BACKUPS ===n"; cd /var/lib/psa/dumps/domains && du -ks * | sort -nr | cut -f2 | xargs du -sh; echo "[Total `du -hs . | cut -f1`]"; fi;

=== PLESK BACKUPS ===
48K example.tk
20K example123.tk
20K example.ca
20K exampletr.ca
20K 123example.com
[Total 132K]

Fell free to modify.

LEAVE A REPLY

Please enter your comment!
Please enter your name here