In this topic
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.
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
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 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>.