VMware Cloud Foundation

 View Only
  • 1.  Using CRON to purge old NSX backups\SFTP backup server filling up

    Posted Dec 08, 2025 09:56 AM

    Periodically, our SFTP backup target fills the backups partition causing all SDDC, vCenter, SSPI and NSX backups to fail until we prune old NSX backups to make space. NSX is the only product that doesn't have pruning built in, so it fills the backup server to capacity until someone intervenes. Is anyone using CRON to purge old NSX backups? If so, what does the job look like? Is there a better solution?



    -------------------------------------------


  • 2.  RE: Using CRON to purge old NSX backups\SFTP backup server filling up

    Posted Dec 08, 2025 10:22 AM

    @HMyersJHA,

    Please take a look at below. 

    https://techdocs.broadcom.com/us/en/vmware-cis/nsx/nsxt-dc/3-2/administration-guide/backing-up-and-restoring-the-nsx-manager/removing-old-backups.html#:~:text=Last%20Updated%20September%2029%2C%202025,time%20the%20script%20is%20run.



    ------------------------------
    If you find this answer right, please 'Recommend' this post.

    Thank you!

    Regards,
    Shen
    ------------------------------



  • 3.  RE: Using CRON to purge old NSX backups\SFTP backup server filling up

    Posted Dec 10, 2025 04:52 PM
      |   view attached

    This is an interesting solution, but this is a VCF environment. The language in the KB says, "The script fails if any other subfolders are present in the backup directory other than cluster-node-backups and inventory-summary."

    The backup targets are managed by SDDC so there are extra folders present by default which will make the script fail if I'm reading that right. (See attached image).

    -------------------------------------------



  • 4.  RE: Using CRON to purge old NSX backups\SFTP backup server filling up

    Posted Dec 09, 2025 05:38 AM

    @HMyersJHA, i have a scheduled task on our NAS with two commands to keep 7 days of backups:

    find /path-to-nsx-backup-folder/inventory-summary -name 'inventory-*.json' -type f -mtime 7 -delete
    find /path-to-nsx-backup-folder/cluster-node-backups -mindepth 2 -maxdepth 2 -name 'backup-*' -type d -mtime 7 -exec rm -rf "{}" \;
    -------------------------------------------