Mass removal of old scroll versions
There are a lot of old versions of pages that we no longer need and as we are migrating to a new system we would like to truncate the spaces we are migrating by removing old versions. Ideally removing versions older than a year or only keeping a certain amount of versions.
Is this possible? Perhaps by SQL manipulation of the CONTENT / BANDANA / os_propertyentry tables?
-
We do have CLI for Confluence, and if we use RemovePageVersion will that remove the scroll versions too?
-
Hi Steve,
if we use RemovePageVersion will that remove the scroll versions too?
No, this won’t remove space versions defined by Scroll Versions app. This option refers to page versions that you can see in Page Tools → Page History.
why removing old space versions through the UI is not an option for you?
Roman.
-
We also have Scriptrunner and the Prune Versions job which should work, but again will this work for Scroll versions? Same also applies to the Purge Page Versions addon. Basically, is there any tool anywhere which will mass remove Scroll versions of pages from Confluence? If not, this is going to be a big problem to clean this all up. I cant imagine having to do this by hand in the UI per space.
-
Hi Steve,
the only supported way to remove versions is through the UI. Modifying the tables with Versions data in the DB is not supported and may cause inconsistent data in spaces, which could lead to inability to edit pages, error banners and other issues.
Why do you need to remove old versions? Just in case you don’t know: versioned pages will also be removed if a version is removed.
Roman.
-
We have 2000 spaces. UI is not feasible. The fact that there are multiple 3rd party ways to do this with normal versions (adaptavist, bob swift etc), shows that this is a necessary feature. Atlassian ticket for this here: https://jira.atlassian.com/browse/CONFSERVER-27701
I need a way to do this is in Scroll. Either supported or not. I am a SQL admin.
-
Hi Steve,
it’s possible to delete specific versions in a space with REST API request.
1. Grab versionId for each space version. It can be retrieved in the JS console of the browser by executing following JS in the desired space:
Scroll.Versions.Context.space.allVersions
The request returns an array with all the versions available in the space.
2. Do a DELETE REST API request to {confluence_base_url}/rest/scroll-versions/1.0/versions/{spaceKey}/{versionId} with 'content-type: application/json'.
Does this help?
Roman.
Please sign in to leave a comment.
Comments
8 comments