Windchill - Unreferenced Vault Files
When objects are deleted in Windchill, through the UI, any related vault files that exist aren't also automatically deleted at that time. Revaulting, which can run automatically or on a schedule, copies files from one vault to another but doesn't delete files. These functions leave files in the vault that are no longer referenced in the database. PTC tech support article CS24438 gives some background info. The Windchill Help Center has more info.
These unreferenced files should be cleaned up occasionally by an administrator. PTC provides lots of documentation on it. Points to note:
- PTC Recommended Frequency = Monthly
- All vaults on all sites will accumulate unreferenced files over time
- Cache vaults store uploaded files temporarilty until they are revaulted/synchronized to permanent storage location and therefore accumulate unreferenced files more quickly than other vault types.
- Running vault cleanup can free up lots of storage space.
- Cleanup can be done automatically (2 types) or manually - see PTC TS article CS93526
- Vault cleanup jobs can run for hours on a large vault.
- WinDU Unreferenced Files Report (ListUnreferencedFiles) can be used to preview the unreferenced files before cleanup.
- IMPORTANT: I have had referenced files be removed from the vault when running remove unreferenced files jobs. It's very important to backup the vaults.
My vault cleanup strategy:
- Automatic for cache vaults frequently. Schedule every two days for busy sites. In Vault Configuration tool, uncheck "Automatic cleanup of older content" for replica-only vaults and check for cache vaults. Master vaults cannot be cleaned up this way to prevent losing the master (non-replica) file. Delete vault files during auto cleanup using wt.fv.master.deleteUnreferencedFilesOnAutoVaultCleanup=true but ensure auto vault cleanup and remove unreferenced files doesn't run at same time (CS241618). Until this problem is fixed (not as of 10.2 M030 CPS17) it is best to set wt.fv.master.deleteUnreferencedFilesOnAutoVaultCleanup to false and run wt.fv.tools.RemoveUnreferencedFiles in a batch file per CS93526 for all vaults including cache vaults.
- Manual (or semi-automatic scheduled) for all replica and master vaults monthly. PTC TS article CS56539 gives the steps to manually run vault cleanup using the Vault Configuration tool.
- Run Automatic Cleanup of cache vault off-hours from heavy vault usage, not only for performance reasons, but I noticed that if a sync is moving files from the cache vault to a master vault at the same time as a cleanup is running, the cleanup fails.
