At some point, you may need to transfer map caches between folders or machines. For small caches, you can use the operating system's copy and paste functions. Large caches can be more challenging to copy. This is usually due to the immense number of files involved rather than the amount of disk space taken by the cache.
The compact cache storage format is designed to facilitate copying of large caches. In this type of cache, tiles are not stored as individual files; rather, they are grouped into .bundle files. This results in much fewer files to copy as well as a smaller cache. Using the compact cache storage format instead of the alternative exploded storage format can significantly reduce cache copy time.
If you do need to copy large exploded caches, use the command line instead of the copy and paste functions. The Robocopy command can copy a directory and all subdirectories therein. Following is one example of how you might use Robocopy to copy a cache, USA, from a location on the network (mapped to drive Z) to a cache directory on your local machine:
robocopy Z:\cache\USA C:\arcgisserver\arcgiscache\USA /s
For further help with command line syntax and parameters, see the Robocopy command documentation from Microsoft.
Various third-party applications are available that are designed to help copy large numbers of files. Copying with these applications may prove more stable than using the operating system tools. Some of these applications allow scheduling and queuing of jobs.
When using FTP to move exploded caches, the transfer may go more smoothly if you zip bundles of files together beforehand. You do not have to apply compression to the zipped files; the goal is just to avoid transferring an unwieldy number of small files. Several third-party applications are available that can simplify zipping and extraction.
Caches and folder structure
You can copy a cache onto a machine with an existing map service and the cache will be detected when the service restarts. The top-level cache folder must have the same name as the map service. An exception is when the map service is organized in a folder on the GIS server, in which case the top-level directory syntax is <folder name>_<map service name>.