Selectively delete old versions of assets?

Wing Ming Chan's Avatar

Wing Ming Chan

17 Nov, 2014 02:03 PM

I know that under Utilities -> Database Tools -> Optimize Database, I can remove all old versions of assets. But is there a way to remove some, but not all, old versions of assets? For example, can I just remove all old versions of data definition blocks but not other asset types, or old versions of pages modified three months ago or before?

Wing

  1. Support Staff 1 Posted by Tim on 17 Nov, 2014 03:02 PM

    Tim's Avatar

    Hi Wing,

    Currently it is not possible to limit the removal of versions to certain types of assets. The Optimize Database tool option, as you mentioned, will remove all versions from all assets. Lowering your Max Asset Versions setting provides the ability to trim versions (without removing all of them), but it also applies to all assets.

    I encourage you to add a new idea to our Idea Exchange that would allow for selectively removing versions from certain asset types. This way others can vote and comment on it.

    Let me know if you have any further questions!

    Thanks

  2. 2 Posted by Wing Ming Chan on 17 Nov, 2014 03:48 PM

    Wing Ming Chan's Avatar

    Tim,

    Thank you for the info. The reason why I asked is that I have found a way to do exactly what I wanted, but I wanted to make sure that this feature is in fact missing from Cascade, so that I am not reinventing the wheel.

    Wing

  3. Support Staff 3 Posted by Tim on 17 Nov, 2014 03:52 PM

    Tim's Avatar

    You bet! That will be a nice addition to the Web Services library that you've been working on. When you have a chance, do you mind providing a link to your library so that others who come across this post might benefit?

    Thanks!

  4. 4 Posted by Wing Ming Chan on 17 Nov, 2014 04:16 PM

    Wing Ming Chan's Avatar

    I am sorry to tell you that it is not that simple. To retrieve ID's of old versions of assets, meeting certain search criteria, I have to query the database directly. Once I have the ID's, they can be removed easily using my library.

    To retrieve ID's, one can either use an external program to query the database, or, as I am interested in exploring, use Velocity to generate such a report and publish it first. I can use a Velocity script, attach it to an XML page, which then contains all the ID's and publish the page. Then a simple web service script can read this published page, grab all the ID's, and remove the assets.

    Wing

  5. Support Staff 5 Posted by Tim on 17 Nov, 2014 04:19 PM

    Tim's Avatar

    That makes sense. I appreciate the clarification, Wing. Have a good one!

  6. Tim closed this discussion on 17 Nov, 2014 04:19 PM.

  7. Wing Ming Chan re-opened this discussion on 17 Nov, 2014 08:11 PM

  8. 6 Posted by Wing Ming Chan on 17 Nov, 2014 08:11 PM

    Wing Ming Chan's Avatar

    For documentation on how to do this using Velocity, see Reporting Old Versions of Assets.

    Wing

  9. Wing Ming Chan closed this discussion on 17 Nov, 2014 08:11 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac