Issue
- As an administrator, I would like to clean up the environment - therefore retrieve free space - by deleting previous exports which are no longer needed.
Environment
- Liferay DXP 7.1
Resolution
- Resolution A) - A method to delete previous exports on the UI
- Log in as admin
- At the Product Menu, navigate to Content / Documents and Media or any other portlet/site which supports export/import (see screenshot export_modal.png)
- By clicking the ellipsis menu (three dots at the top bar), navigate to Export/Import modal
- At Export/Current and Previous tab, select the export to be deleted
- At the ellipsis menu, select Clear (see screenshot export_modal2.png)
- Note: An administrator should see the exports of other users as well on the UI, although sometimes they may not be visible due to various reasons. In such cases, a script may come in handy to discover and delete these exports which are no longer needed.
- Resolution B) - the script method
- The script can be ran at menu Server Administration -> Script from the UI of DXP.
- The attached Groovy script is designed to delete background tasks (every export/import process run as background tasks as well). Indeed, it is aimed to do the same method as described above on UI.
- It is possible to export a portlet or the whole site. The script handles both - it is only required to fill the
groupId
.
Additional Information
- Please note: Such custom scripts may only be applied in production at your own discretion, after thorough testing.
Subscriber Exclusive Content
A Liferay Enterprise Subscription provides access to over 1,500 articles that include best practices, troubleshooting, and other valuable solutions. Sign in for full access.
Sign In