Skip To Content

Copying caches

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.

If you are copying and transferring a cache between two sites that are both using the same storage format, you can do so seamlessly from your machine.

Copy a compact cache

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 ArcGIS Enterprise, use the Export Map Server Cache tool in ArcGIS Pro to export a cache in older storage formats as a compact or exploded cache.

Copy a large cache

Various commands can be used to copy large amounts of cached data. Along with cp -r and tar -cf, you can use the following commands to copy cache data:

  • When copying a tarball archive cache, use the following command:

dd if=<source tar file> of=<destination tar file> bs =2046k

Note:

The value of the block size (bs) can be increased or decreased to accommodate the appropriate bandwidth.

  • To copy large cache directories to a remote machine while tracking their progress, use the following command:

rsync -avx -progress /arcgiscache/mapservice user@remotemachine:/destination/directory

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.

You can also copy caches from filesystem directories to object stores in the cloud when the arcgiscache folder structure is maintained in the objectstore bucket or container and the cache directory name is the same as the service name.

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>.

Note:

For services published using ArcMap, the default dataframe name used to be Layers. This differs from the default map name in ArcGIS Pro projects. Ensure that the service layer name matches the service cache directory structure <map service name><Layer_name/Dataframe_or_map_name>