BigMemory 4.3.9 | Component Documentation | WAN Replication User Guide | Administering WAN Replication | Using the Cleanup Utility
 
Using the Cleanup Utility
If a cache that was registered with a TSA subsequently becomes inactive, then when the cache becomes active again, the TSA will attempt to verify that it has the same configuration. Therefore, in order to change the WAN enabled/disabled status of caches that have already been registered in a TSA, the existing WAN information will need to be removed. The cleanup-wan-metadata utility, found in the /server/bin directory of the BigMemory kit, is provided for this purpose.
To run the script:
cleanup-wan-metadata.sh -f "configLocation"
The script requires the configLocation argument, which is the URI location to either a wan_config.xml file or an ehcache.xml file.
If the configLocation specifies an ehcache.xml, the script performs cleanup all the caches mentioned in it. If the configLocation specifies a wan_config.xml, the script will look for all the ehcache.xml locations listed in it and clean up their caches.
The cleanup is performed for every cache, whether WAN-enabled or not. This is useful when you want to convert a WAN-enabled cache to non-WAN cache, or a non-WAN cache to a WAN-enabled cache.
Note that the script does not modify ehcache.xml or wan-config.xml files in any way. It simply removes WAN-related information from Terracotta servers.
Procedure to convert caches
In a wan-enabled system, if you need to EITHER convert a wan-enabled cache to a non-wan cache OR convert a non-wan cache to a wan-enabled-cache, follow the below steps:
1. Bring down all the clients and Orchestrator.
2. Modify the wan-config.xml and the ehcache.xml files as per the new configuration requirement.
3. Run the cleanup-wan-metadata script with the new configuration as the parameter.
4. Start the Orchestrator and clients again with the new configuration files.