At some point, you may need to transfer map caches between folders or machines. The process depends on the format of your cache, the versions of ArcGIS Server to and from which you are copying the cache, and the size of the cache file or files.
Copy a compact cache
The compact cache storage format, available in ArcGIS Server 10.0 and later, is designed to facilitate copying of large caches. In this type of cache, tiles are not stored as individual files as in exploded caches; 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.
Learn more about the compact cache storage format
The compact cache format has two versions: compact, introduced at 10.0, and compactv2, introduced at 10.3. The earlier version includes a separate .bundlx file that serves as an index; the newer version incorporates the index into the .bundle file. This improves performance, particularly when the cache is located on a network share or a cloud store. However, the newer version of the compact cache can only be used by ArcGIS Server sites running 10.3 and later. It's the default format for caches created in these versions.
If you are copying and transferring a cache between two sites that are both at 10.3 or later, you can do so seamlessly from your machine.
If you are transferring a compact cache generated by a site running 10.3 or later—meaning it is in the compactv2 format—to a site running a version 10.0 through 10.2.2, use the Export Map Server Cache tool in ArcMap or ArcGIS Pro. This tool produces a compact cache in the earlier version (with a separate .bundlx file). You can then send the exported cache to the recipient server site. You can also use this tool to export exploded caches for use in 10.0 and earlier.
If you are transferring a compact cache to a site running ArcGIS Server 10.3 or later, you should update it to the improved compactv2 format. To do so, use the Upgrade Map Server Cache Storage Format tool in ArcMap (or its ArcPy equivalent).
Tile packages allow you to create a tile cache from a map (typically a subset of the map extent) for use as a basemap in ArcGIS applications, whether online or offline. At 10.7, a new tile package format, .tpkx, uses the newer version of the compact cache. This format is available when creating tile packages in ArcGIS Desktop and ArcGIS Pro.
Copy a large cache
If you need to copy large compact or 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 that are designed to help copy large numbers of files are available. 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 that can simplify zipping and extraction are available.
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>.