Symptoms

Diskspace usage on VZ Backup node in OA under Services > Cloud Infrastructure > VPS Hardware Nodes > Backup Node > Stored VPS Backups shows:

While real current usage is 6.4T:

[root@vzlinbuckup01 ~]# df -h | grep vz
/dev/sda3       7.2T  6.4T  400G  95% /vz


Cause

There are a lot of corrupted backups without 'info' and 'metadata' files that cannot be managed by VZ Agent on the backup node.


Note: This article is about VPS Hosting (Non-OACI-based). The related documentation is https://docs.cloudblue.com/oa/7.4/premium/content/VPS-Hosting-(non-OACI-based)-Guide/Introduction90338.htm

If the affected node is a part of an OACI infrastructure, please follow this article instead:

https://cloudblue.freshdesk.com/support/solutions/articles/44001881758-how-to-delete-orphan-backups-from-oaci-backup-node-that-are-not-listed-in-cp


Resolution

  1. Synchronize VZ agent database to collect actual data of managed backups:

    # /opt/pva/agent/bin/vzbackupsync
    
  2. Acquire the list of corrupted backups by withdrawing (line-by-line) the list of 'good' backups (have 'info' file inside) from the list of all backups:

    # find /vz/backups/ -name info | sort > goodbackups
    # sed -r 's/.{5}$//' goodbackups > goodbackups_trimmed
    # ls -d /vz/backups/*/* | sort > allbackups
    # comm -3 allbackups goodbackups_trimmed > corrupt_backups
    
  3. Remove corrupted backups:

    # rm -rf `cat corrupt_backups`
    

Internal content