Select to view content in your preferred language

How copy map service from one ArcGIS server to another ArcGIS server

34203
26
Jump to solution
03-25-2013 02:19 AM
Rakibul_IslamRoni
New Contributor
Hi, I need to copy Map service which is created in ArcGIS server 10.1 (sp1), to another ArcGIS server (10.1 sp1) machine. I am trying to do this process manually by copying service file from C:\arcgisserver\config-store\services and C:\arcgisserver\directories\arcgiscache and *.JSON files. Service can read by new machine but cannot start the service. So please give a direction that how can i do this work.
Tags (2)
1 Solution

Accepted Solutions
SebastienPetit
Frequent Contributor
Hi, I need to copy Map service which is created in ArcGIS server 10.1 (sp1), to another ArcGIS server (10.1 sp1) machine. I am trying to do this process manually by copying service file from C:\arcgisserver\config-store\services and C:\arcgisserver\directories\arcgiscache and *.JSON files. Service can read by new machine but cannot start the service. So please give a direction that how can i do this work.


Dont know why it is in ArcGIS online but we managed to "transfer-copy" services from one machine to another with ArcGIS Server 10.1sp1.

You must keep the same name for the folder.

You will have to copy all the ressources from server A to server B. The best is to check all folders and subfolders in arcgisserver folder.
In our case we had to copy from
\arcgisserver\config-store\services
\arcgisserver\directories\arcgiscache
\arcgisserver\directories\arcgisoutput
\arcgisserver\directories\arcgissystem\arcgisinput

View solution in original post

26 Replies
JonathanQuinn
Esri Notable Contributor
I've never gotten this to work and don't know if it's possible.  I'd suggest you move the cache, copy the mxd over to the new server, and publish a service with the same name as the cache folder.  It'll pick up that it's supposed to be cached.
SebastienPetit
Frequent Contributor
Hi, I need to copy Map service which is created in ArcGIS server 10.1 (sp1), to another ArcGIS server (10.1 sp1) machine. I am trying to do this process manually by copying service file from C:\arcgisserver\config-store\services and C:\arcgisserver\directories\arcgiscache and *.JSON files. Service can read by new machine but cannot start the service. So please give a direction that how can i do this work.


Dont know why it is in ArcGIS online but we managed to "transfer-copy" services from one machine to another with ArcGIS Server 10.1sp1.

You must keep the same name for the folder.

You will have to copy all the ressources from server A to server B. The best is to check all folders and subfolders in arcgisserver folder.
In our case we had to copy from
\arcgisserver\config-store\services
\arcgisserver\directories\arcgiscache
\arcgisserver\directories\arcgisoutput
\arcgisserver\directories\arcgissystem\arcgisinput
TomSchuller
Frequent Contributor
Just solved us several hours of migration time.

Thanks,
  Tom 

In our case we had to copy from
\arcgisserver\config-store\services
\arcgisserver\directories\arcgiscache
\arcgisserver\directories\arcgisoutput
\arcgisserver\directories\arcgissystem\arcgisinput
TimothyPoe
Deactivated User
If you find you have to make edits to the service such as a data connection, here is an article on editing the .MSD.

Best,

Tim
PaulFerro1
Deactivated User
I am with J.Quinn and roni0512 on this one. I have copied all of the ArcGIS directories noted below plus accompanying .mxds from server A to B.  The services are read on server B but are not able to be started.  In ArcCatalog I get the error message:

ERROR: Service failed to start,
 Machine: myServer.COM [null]


In ArcGIS (AGS) Server Manager, there are even thumbnails of the services but the start button is grayed out at Status reads "Stopping..."
I then restarted ArcGIS Server in IIS, and Status still reads "Stopping..."

I did NOT copy .site from the directories listed below.
--------------------------------------------------------------------------------------------------
update: I repeated the process, this time stopping AGS in IIS first, then copied all of the directories plus .site and my services show up again, this time status is "Started" and all of the service URL's are there as REST endpoints but pinging the URL you get the error:

Error: Error handling service request : 0x80070005 -
Code: 500

When trying to add a service to ArcMap I get the Warning:
Could not add the specified data object to the map.
Could not connect to the Map Server.
0 Kudos
SebastienPetit
Frequent Contributor

Also we developped some tool to do that in a more automatic way :

GitHub - eea/discomap.ServiceTransferTool: Transfer tool

Others tools

European Environment Agency · GitHub

ChrisJensen
Regular Contributor

Sebastien,

Will your transfer tool work with two different versions of server?  I would like to move services on 10.1 to a new 10.3.1 server.

0 Kudos
SebastienPetit
Frequent Contributor

Yes.

We did several test (not these exact versions) and it was working

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Edit #2:  I got it to work.  See my summary information at the end.

Hi Sebastien,

This thread is about 8 months old now, but thought I would see if you monitor it at all.  I downloaded the ServiceTransferTool from github and was trying to see if I could go from an AGS 10.2.2 machine to AGS  10.4.1....but have tried running both in Desktop 10.4.1 (on server) and my local Desktop 10.3.1.  I had to comment out the import of pymssql and the writeinDatabase function, but that looked like it was something more internal to eea, so I don't think that matters.

However, I am getting an error

My arcgisserver service directories are on the D drive, so it seems to be getting that info, but it should probably b "d:\\" ...not error is not showing the ":".    I've been trying to work backwards to see where this is being pulled from, but haven't found it yet.  Although I have a utility that looks at the config.json file for this info, so maybe this is doing the same (and I just haven't found that yet).

The attributes I am entering:

my input includes:

<sourceServer> 6080 <admin> <adminpass> MapServer <checked services, public ones> <targetServer> 6080 <admin> <adminpass> <blank> \\<targetServer>\<shareToD>\<newfoldername1>  OverwriteIsChecked \\<targetServer>\<shareToD>\<newfoldername2>

  for the systemTemp and backupTemp I am putting in   "\\<targetserver>\<shareToD>\<foldername>"     ..I was putting this as the target server.....it is support to be the source?

Questions: 

  1. where would it have pulled that my files are on the "D" drive (it is not included in any of the input attributes), is it pulling it from the arcgis settings, or is it just assuming "D" (hardcoded somewhere I haven't found yet??)?
  2. Is is ok that I do not use the pymssql  module?
  3. What folders should I copy to the new server before running....are there any requirements?  I did copy over the \arcgisserver\directories\arcgisssystem\arcgisinput folder     

   ....I notice that my mxd is not in the root of the service, but in a subfolder  \extracted\v101    ..maybe that is a remanent from the 10.1->10.2.x migration ??

For what it is doing, I do not think the error has anything to do with 10.4.x

If you have any insight I would appreciate it.  It looks like a useful tool if I can get it to work for our site.

Thanks for any help.

*******************************

Edit: getting closer.  I had to change a few lines to have it take my server name in the path to the services .mxd location...still need to work on that to make it more automatic, but it does find the mxd now.  If running on a 10.3.1 again the target 10.4.1,  it would crash I'm assuming because it doesn't like the versions being different.  So running in Desktop 10.4.1 on the target server...with about 5 patches, including the publishing patch.....I can get to Step 4 but the service will not publish (although it thinks it was successful, per a message.  I need to go investigate this next.

This is the new error I am getting:

SUMMARY (Resolved)

Wanted to give a summary of what I did to get this to work.  I tested on a 10.4.1 AGS server, pulling from a 10.2.1 AGS server.

  1. Downloaded the software from GitHub - eea/discomap.ServiceTransferTool: Transfer tool    unzipped to known folder
  2. Tested and ran in ArcCatalog 10.4.1 which was compatible with my target AGS version. 
  3. Made sure my data sources were copies over....not sure if this was needed or if the tool would do it, but thought it better to just do it.
  4. Modified using TransferServices.py to fit my needs:
    1. Commented out line #9  import pymssql   and the function writeInDatabase approximately lines 532-547
    2. traced variable "finalServiceName" backwards to  "serviceName" and "inputFolderPath" and eventually back to "pathInitial" which was the actual start of my "can't find the mxd" issue (about line 589).  I add a few more formatiing lines (and print statements) to get the mxd to read from the source server's d$ drive in the <service>\extracted\v101 folder.  This is how all our services on the 10.2.1 machine are set up.  Whether this is a standard path or because we've updated thru several versions, I do not know.
  5. Initially I thought I wanted to copy the \arcgisserver\directories\arcgissystem\arcgisinput over from the 10.2.1 machine.  But this was not needed and might have been causing an issue.  I reset (that is, restored my backup of this folder) and then restarted the ArcGIS Server (I hadn't done that thru the previous steps).

After all that, my 4 "public" test services (have not tested secure services yet) worked. 

Only other issue, which is an internal things, as I was getting ssl certificate errors/warnings. I just closed the popup and it continued.  This is a self-signed cert, with "10dot" addresses...that is, something that network services has for our internal servers.  I've given up on trying to have them get rid of the error, since things work for my test environment (just annoying).

Hope this helps someone down the line.  My procedures my not work specifically but may help with debugging.   Have fun.