NSX-T automated backup cleanup
search cancel

NSX-T automated backup cleanup

book

Article ID: 414685

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

In order to save space it is recommended that you periodically clean up old backups for the NSX managers. The following document can automate this process on the NSX manager.

Environment

NSX

Resolution

The tech doc below has a script that is already on the NSX managers where you can define the backup age before NSX will automatically clean it up.
Login to the NSX manager as root, and navigate to the directory below. You can use a cron job to schedule this script to run periodically from the NSX manager or from your backup server.
/var/vmware/nsx/file-store/nsx_backup_cleaner.py

Script

nsx_backup_cleaner.py -d backup_dir [-k 1] [-l 5] [-h]
Or
nsx_backup_cleaner.py --dir backup_dir [--retention-period 1] [--min-count 5] [--help]

Required parameters:
    -d/--dir: Backup root directory
    -k/--retention-period: Number of days need to retain a backup file

Optional parameters:
    -l/--min-count: Minimum number of backup files to be kept, default value is 100
    -h/--help: Display help message

 

Additional Information