Updater Scripts
Overview
Updater scripts enable you to perform bulk modifications to repository content using Groovy. You can create, manage, and execute these scripts directly from the CMS UI through the Updater Editor.
Use Cases
Use updater scripts to automate changes across multiple content items. Common scenarios include:
- Generating thumbnails for all images of a specific type.
- Renaming a field across all documents of a certain type.
Advantages Over JCR Runner
The Updater Editor offers several benefits compared to the JCR Runner forge project:
- You do not need Console access to run updater scripts.
- Scripts execute within the same JVM as the repository, eliminating the need for RMI and improving performance.
- The system logs detailed information about each updater run, including data that supports automatic rollback of changes.
Related Documentation
- Write an Updater Script
- Run an Updater Script
- Examples
- DocumentsInfoScript
- BinariesInfoScript
- Override Compilation Customizer for Groovy Updater Scripts
Important Considerations
Impact
Updater scripts can change large portions of your repository. Only run scripts after reviewing their logic and verifying their effects.
Security
Updater scripts run in a custom Groovy ClassLoader that blocks some unsafe operations (such as System.exit()). However, this environment is not a complete sandbox. Scripts can potentially execute external programs and affect the server environment.
Restrict access to the Updater Editor and script execution to trusted developers and administrators. Always review scripts for security risks before execution.