Running the nsx_backup_cleaner script does not clean the backups directory as expected
search cancel

Running the nsx_backup_cleaner script does not clean the backups directory as expected

book

Article ID: 312080

calendar_today

Updated On:

Products

VMware Cloud Foundation

Issue/Introduction

  • The nsx_backup_cleaner script is failing with  message similar to:
    Cleanup script works only in folders, that contains subfolders "cluster-node-backups", "ccp-backups" and "inventory-summary"
  • SDDC backups is using the same directory as NSX backups, or, the NSX backups directory contains other folders.

Environment

VMware Cloud Foundation 4.4.x
VMware Cloud Foundation 4.4.1
VMware NSX

Cause

The nsx_backup_cleaner script cleanup process fails if any additional directories are present in the root directory where the backup location is. A common scenario is when the SDDC Manager backups are using the same backup directory as the NSX Manager, which will cause the script to fail.

Resolution

This is a condition that may occur in a VMware NSX environment.

Workaround:
 
The script attached to this KB works around the issue.

Additional Information

More information can be found in the documentation: Remove Old Backups.


Attachments

nsx_backup_cleaner.py get_app