Post-clone cleanup scripts
-
- UpdatedJan 30, 2025
- 3 minutes to read
- Yokohama
- Now Platform Administration
Cleanup scripts automatically run on the target instance after the cloning process finishes.
Use cleanup scripts to modify or remove bad data. Cleanup scripts run after data preservers and the clone are complete.
You can add new post-cloning scripts on the source instance to perform any action that can normally be accomplished through script includes or business rules. To add a script, navigate to New.
and clickNote: Cleanup scripts will always run on clones created using a Clone profile, this is necessary as they're available OOB and ensure a healthy state post clone. After the clone completes, all cleanup scripts are combined together
as a scheduled job named Execute Clone Cleanup Script: Execute Cleanup Scripts Sequentially and run till completion in the global scope. The cleanup scripts are ordered based on the order field. Cleanup
scripts must be defined on the Source instance.
You can make post-clone scripts active or inactive to control whether these scripts run or do not run. You can also set an order number on each
script, which enables you to set the order that the active scripts run, with lower numbers having a higher priority. 
Note: All cleanup scripts run in the global scope irrespective of the scope in which you have configured the cleanup script. An example of how to run a scoped script is to
- Create a script include in the desired scope with the cleanup logic in it.
- Have a Restricted Caller Access configuration in place to allow access to your scoped script, be sure you are in the scope of the script include used to create the RCA.
- Call the script include from the clone cleanup script.
The following post-clone cleanup scripts perform various actions on the target instance.