Backing up the Mid Tier cache
To create a cache and back up the Mid Tier cache
- Install and set up Mid Tier on a computer outside of the Mid Tier cluster with no tenants added.
- Update the Cache Backup Directory folder path for the Mid Tier (for example /opt/bmc/ARSystem/midtier/backup.cache).
- Open the Mid Tier Configuration Tool.
- Click the Cache Settings link to open the Cache Settings page.
- Update the Cache Backup Directory folder path.
- (Optional) Perform this step after you have onboarding the first tenant.
- Stop the Mid Tier.
- Copy the backup cache from shared location to backup folder of the Mid Tier.
- Delete all the content from the cache folder.
- Start the Mid Tier.
- Add a new tenant AR System server to the Mid Tier.
- Start the preload for the tenant AR System server.
- When the preload is complete, stop the Mid Tier.
- Back up the cache folder (as described below).
- Replace the backup cache that is stored at the shared location.
- Update the backup cache directory folder path for all the Mid Tiers in the cluster with the new backup cache directory folder path.
To verify whether the cache is intact
- Stop Tomcat.
- Open the .lck file located in the midTierInstallationDirectory\cache directory.
- Verify whether the SHUTDOWN_COMPLETED state is available in the file.
- Restart Tomcat.
The cache is intact only if the SHUTDOWN_COMPLETED state is available.
To back up and restore the Mid Tier cache
Create a directory in any location on the computer where the Mid Tier is running, and copy the intact cache to this location.
For example, copy the Mid Tier cache directory located in the midTierInstallationDirectory\cache folder to the /opt/cache_backup folder.Ensure that you retain the timestamps of the data and index files. The backed up copy is not considered as a good copy if the timestamp does not match.
- On the Cache Settings page, in the Backup Directory field, enter the path and name of the directory that you created in the previous step.
- On the Cache Settings page, click Save Changes.
- (Linux) Stop Tomcat and use the backup utility to take a back up of the cache.
- Restart Tomcat and click Sync Cache to sync the cache for the AR System server.
To use the cache backup utility (Linux only)
- Make sure that the Mid Tier is not running.
Navigate to the Mid Tier root by using the following command:
cd /opt/bmc/ARSystem/midtier/tools- Assign execute permission to the cacheBackupUtility.sh file, as follows:
chmod 755 cacheBackupUtility.sh - Run the backup script and provide the backup directory name as the parameter.
For example: /cacheBackupUtility.sh /opt/cache_backup/
To use a good copy of the cache
- Ensure that the target Mid Tier, on which you want to use good copy of the cache, is not running.
Copy the /opt/cache_backup/cache.tar from the first Mid Tier to the target Mid Tier and extract it on the target Mid Tier. For example, use the following commands to copy and extract the .tar file:
To copy:
scp /opt/cache_backup/cache.tar root@targetMidTier:/opt/cache_backup
To extract on the target mid tier:
cd /opt/cache_backup
tar -xvf cache.tar- Ensure that the path to the backup directory is set to /opt/cache_backup in the arsystem.ehcache.midTierBackupCacheDir property.
- Go to the target Mid Tier and delete the midTierInstallationDirectory/cache directory.
- Start the Mid Tier which will automatically start using the good copy of the cache.