Select to view content in your preferred language

Scripts for updating Map services from 10.1 to 10.2 AGServer

1005
1
Jump to solution
03-19-2014 02:03 PM
jayshukla
Regular Contributor
Hi There, Here is my scenario: I have large number of map services (100+) within current production environment (10.1) that I need to migrate to the new server environment for 10.2. As part of upgrade, new ArcGIS Server 10.2 wil be hosted on a new server. I wanted to know if there is way to script/automate publishing of map services? Thanks Jay
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JonathanQuinn
Esri Notable Contributor
There are a few resources on the help site regarding automating publishing services:

Publishing from a map document

Publishing from a text file

When you publish to ArcGIS Server, an MXD and MSD are placed in the arcgisinput folder within the site, Ex. C:\arcgisserver\directories\arcgissystem\arcgisinput.  What you can do is loop through this directory for the mxd's and then publish them to your other ArcGIS Server site.  The thing to make sure of here, though is that all data workspaces in the old server site are registered with the new server site.  Attached is a script tool and script I wrote a bit ago to write the workspaces of mxd's in a directory to a file.  This can be used to check the workspaces of all the mxd's you have published and register them.

What you can also do is loop through the directory as described above, and follow the documentation below to register data sources at publish time:

Register a data folder at publish time

The main thing is to make sure your data sources are registered correctly in your new server if you're going to automate this process.

View solution in original post

0 Kudos
1 Reply
JonathanQuinn
Esri Notable Contributor
There are a few resources on the help site regarding automating publishing services:

Publishing from a map document

Publishing from a text file

When you publish to ArcGIS Server, an MXD and MSD are placed in the arcgisinput folder within the site, Ex. C:\arcgisserver\directories\arcgissystem\arcgisinput.  What you can do is loop through this directory for the mxd's and then publish them to your other ArcGIS Server site.  The thing to make sure of here, though is that all data workspaces in the old server site are registered with the new server site.  Attached is a script tool and script I wrote a bit ago to write the workspaces of mxd's in a directory to a file.  This can be used to check the workspaces of all the mxd's you have published and register them.

What you can also do is loop through the directory as described above, and follow the documentation below to register data sources at publish time:

Register a data folder at publish time

The main thing is to make sure your data sources are registered correctly in your new server if you're going to automate this process.
0 Kudos