Forum Discussion

angela's avatar
angela
Catalyst II
18 hours ago

VaultRecycleBin - What can go wrong if I just delete the complete folder?

Hi Community,

I´m currently trying to free up some space on our Vault server. 

During this process, I noticed that we have accumulated several very large files in the VaultRecycleBin over the years. The files I checked no longer appear to be referenced in the Innovator database.

What are the risks of deleting the contents of the VaultRecycleBin? My assumption is that deleting everything would not be a good idea. In a few tests, I found that some files in the folder still seem to have active references.

I assume it should be possible to determine which files are still in use and which are no longer needed.

But can anyone explain the purpose of the VaultRecycleBin in more detail? Under what circumstances are files moved to this folder?

I am not using the Force Orphaned Files Delete variable, so I´m wondering whether these files might be the result of interrupted or failed file transfers, or if there are other scenarios that would cause files to end up there.

Any insights or best practices would be greatly appreciated!

Angela

2 Replies

  • Hello Angela,

    I don't know why the files ended up in the VaultRecycleBin. It could potentially be the result of a vault migration, upgrade activity, interrupted file operations, or some cleanup process, but I have not found any documentation that explains exactly under which circumstances Aras moves files there.

    One possible approach would be to extract the IDs of the files contained in the VaultRecycleBin and search the Innovator database for any remaining references to those IDs.

    A modified version of the Find by ID method could be used for this. However, the original method only checks whether the supplied ID matches the id of an Item. It would need to be extended to search all relevant reference columns, including relationship source_id and related_id values, as well as Item properties that reference a File.

    Search an item by id across all item types | Aras

    That should provide a clearer indication of which files are still actively referenced and which ones may truly be orphaned. I would not recommend deleting the entire folder without first validating the results and creating backups of both the database and the vault.

    Good luck

    Michael

    • angela's avatar
      angela
      Catalyst II

      Thanks for your answer and tips!

      Based on your ideas I used PowerShell to generate a list of all file IDs found in the VaultRecycleBin and compared them with the File Items in Aras via SQL. Good news: Not a single one of those files exists as a File Item in Innovator anymore, so I assume it's safe to delete them.

      "I don't know why the files ended up in the VaultRecycleBin. It could potentially be the result of a vault migration, upgrade activity, interrupted file operations, or some cleanup process."

      Well... I´ve literally done ALL of that over the years. 😄

      In 2022, we moved to a new server, including the Vault Server. Back then, I didn´t fully think things through, and some existing folders ended up with incorrect permissions. It´s all well documented in the forum:

      https://community.aras.com/discussions/getting-started/multiple-errors-dophysicalfiles---access-to-the-path-is-denied--when-deleting-fi/10101

      I  assume many of my files in the VaultRecycleBin came from that era of my glorous repairs. 

      I think the VaultRecycleBin is a security mechanism in Innovator. When a file is deleted, it is moved there instead of being removed immediately, providing a fallback in case something goes wrong.

      I have a second Innovator instance that runs for several years know and the VaultRecycleBin is completly empty. Just like there was never an Admin that played around with the file system.