Delete Version history

Hello,

We have over 1000 version histories for some objects.

Is there a way to delete version history from M-Files? Or is it possible to set that only X version histories should be saved?

Or do we have to solve this by code?

Best regards

  • In Admin you can right-click on Content Replication and Archiving. The menu then gives you an option to Archive old versions. Define your criteria and run the job. The old versions will be exported to an XML based package on the server. If you are certain you won't need it again you can just delete that package. If your objects have files in the old versions then the disk space will not be freed up by this procedure alone. You will have to run Optimize Database (Thorough) afterwards. This will take the vault offline during the process.

  • Ahh. I didn't know that feature yet. Thank you.
    But it looks like this only works for documents and not for objects, right?

  • You can change the object type that gets archived with a hidden option in Advanced Vault Settings: expand Configuration > Content Replication and Archiving and select the Exporting node. Then open the Advanced tab and copy-paste the following JSON there with the ID of the object type you want to archive.

    {

      "archiveOldVersionsObjectType": <object type ID>

    }

    The archiving dialog will refer to documents even after this setting is in place so don't get confused by that. It's recommended that you remove this setting after your cleanup is done to avoid future mistakes when someone thinks they are archiving documents.