Rename a cache for a cached map service

1341
6
09-18-2017 11:04 PM
MarkMindlin
Occasional Contributor III

Hi,

We have to understand what is correct time to rename a map cache.

The task is to replace an old map service with cache (format 1 with *.bundlx files) with new map service (format 2) with the same name  of the service, same name of the cache. Environment - ArcGIS 10.3.1 (Desktop,Server)

Publishing a map service with an option of manual cache will create "folder"_"map-service-name" directory with "Layers" directory.

How is possible to rename the directory to "map-service-name"? 

We tried to do it in ArcCatalog but after we cannot restart the map service.

We need to save "old" name of the cache for operational reasons.

Tags (1)
6 Replies
RebeccaStrauch__GISP
MVP Esteemed Contributor

How I update a complete cache, without interrupting the production version:

  1. create a new service <new_temp>  using the same (or copy) of the prod mxd ... 
  2. create the cache with the new_temp service
  3. if I already had a cache for the prod service:
    1. STOP prod service and the new_temp service
    2. rename the prod cache folder as a backup
    3. rename the new_temp cache folder to the correct name for the prod service using File Exployer (not ArcCatalog)
    4. START the prod service
  4. If this cache is new:
    1. as you mentioned, create the folders for the cache by setting up the cache, but as manual
    2. then follow the same steps as above.

When you restart the prod server, it should see the information in the config.xml and automatically register the info.  It would not hurt to delete the status.gdb and then check the status again.  The status.gdb should rebuild itself.

see more help A quick tour of map caching—Documentation (10.3 and 10.3.1) | ArcGIS for Server 

btw: I'll add that you can update a geographic extent of a cache while the service is running, but many times I need to replace the entire cache, and this seems to work best for that, in my opinion.

MarkMindlin
Occasional Contributor III

Thank you Rebecca,

It really makes sense for maintenance. 

As for our case (new cache):

  • We stopped the service;
  • We renamed folder using File Explorer;
  • We started service (not crashed). But it does not work.
  • Checked the Service Properties. On the cache settings, it shows a "Dynamically ..." options - we changed to "Using tiles from a cache"
  • It shows the error:

0 Kudos
RebeccaStrauch__GISP
MVP Esteemed Contributor

So when you created the empty cache for the service with "manual", did it create the folder and structure in the arcgisserver folder? 

Have you told it how you want the scales, etc. setup all ready...and do you know/expect it to be the same as the folder that contains the cache already?

If so, you should be able to compare the config.xml files from the new blank cache folder structure, and the one you will use the replace it.  They need to be exactly the same to do a replace by rename or by moving the L00...Lxx folders over. 

We are still on 10.2.2, but the structure should be about the same (our caches and other files are on our D drive)

  • arcgisserver
    • ImageServicesrFolder   (our image services have another folder layer)
      • ImagerServerName_ImageServer     ( the conf.cdi and conf.xml files are here)
        • _alllayers
          • L00 .... folders with the  bundle and bundlex files
      • status.gdb
    • MapServiceName1
      • Layers  ( the conf.cdi and conf.xml files are here)
        •  _alllayers
          • L00 .... folders with the  bundle and bundlex files
        • status.gdb

I hope that makes sense.  I wanted to point out that Image Services themselves seem to put all those services in the Folder structure that we have on our server...and the actual service folders have _ImageServer in the name.  On the other hand, the Map Services seem to have the servicename folder right below the arcgisserver folder (and ignores the folder they are separate into).      This may be a 10.2.2 thing....just getting started on 10.5.x testing so things may be different in 10.3+    (??)

Just  a thought....the cache folders....was the cache created on the same server, or on another and moved over?  It may be a permission thing.  Make sure that the same permissions are assigned to all the folders/files in the renamed cache folder as are on and folders/files on a new service.

Also, make sure the cache is a compatible version.  If it was created in an older or newer version you may need to try to Import the cache (I seem to recall is a tool for this in 10.3) or possible expand the files from the bundleX and then convert them back into the 10.3. compatible format.  There was a bundlex format change between a couple of the versions, and it may have been 10.3. now that I think about it.  I had test 10.3, we just never implemented it (by choice do to hardware upgrades needed, etc.)

If all else fails, but you know the cache is correct, I would remove the service giving the error, restart ArcGIS Server (reboot), make sure you have the folders setup correctly, and try is again.  Sometimes caches can be finicky, but I do this process all the time, so I know moving them around works.

Hope that helps and isn't too rambling.

MarkMindlin
Occasional Contributor III

Hi Rebecca,

The main point is that we need to upgrade from format1 (bundle+bundlx) to format 2 (only bundle). That means I probably not going to compare the "old" config.xml to new one.

Lets ask a simple question (as per the topic) - rename the cache folder - what is correct time/step to rename a map cache/cache folder? We definitely see that it does not work with cache builded.

As per your questions:

So when you created the empty cache for the service with "manual", did it create the folder and structure in the arcgisserver folder? 

Yes, I see the folder "Layers". It is empty.

 

Have you told it how you want the scales, etc. setup all ready...and do you know/expect it to be the same as the folder that contains the cache already?

Just new service - I do not replace old with new - just try to rename the cache

0 Kudos
RebeccaStrauch__GISP
MVP Esteemed Contributor

Have you looked at the upgrade tool yet?

Upgrade Map Server Cache Storage Format—Help | ArcGIS for Desktop 

Upgrades the compact cache storage format of a map or image service (created at 10.2.2 and earlier versions) to take advantage of performance improvements available at 10.3 and later versions.

Although the old format is supposed to work, I bet certain things in the config file and maybe file structure are a bit different.  I would test an upgrade with a small subset (maybe a few levels) to see if it works before upgrading.

Again, I have done it, so I know it is possible to get the 10.2.2 into the new format and folder structure, but it was a while ago.

MarkMindlin
Occasional Contributor III

Any ideas please

rename the cache folder - what is correct time/step to rename a map cache/cache folder?

We definitely see that it does not work with cache built.

0 Kudos