Select to view content in your preferred language

Migrate Content for ArcGIS Enterprise/ArcGIS Online

21724
112
01-02-2024 09:36 AM

Migrate Content for ArcGIS Enterprise/ArcGIS Online

It's always a good practice to have a DEV/STAGING environment along with a PRODUCTION environment for ArcGIS Enterprise. I frequently get asked how to migrate content from one to the other.  Hosted services can be straight forward, and can easily be scripted (expect an update later to this toolset for this functionality), but referenced services can be rather difficult. For example, there are numerous prerequisites that are required for a service to be published from an Enterprise Geodatabase, such as:

  • does the ArcGIS Service Account have necessary privileges
  • is the geodatabase registered with the ArcGIS Server instance
  • does the feature class in fact exist within the new geodatabase
  • etc

These tools pick up once your services have been published to the other environment and you would like to begin migrating web maps, apps, and dashboards. Take a look at the video below on how to execute these tools.

These tools should only be used to migrate web maps/apps where the environments are the same version (i.e. 11.1).  Migrating content between two ArcGIS Online organizations is also supported.

Currently, these tools have only been tested in ArcGIS Enterprise 11.1 and ArcGIS Online. If there are any issues, please report in the comment section below.

 

Updates

1/16/24:  Added tools to copy hosted feature services and file based items.

1/29/24:  Added option to run when portal has Windows Authentication enabled.  Also, updated the Copy Dashboard tool to specify stand-alone layers.

2/12/24:  Web Map item IDs now update

3/28/24:  Added tool to copy Story Maps

6/30/24:  Group layers and tables are now supported when copying web maps

7/10/24: Experience Builder Templates are now supported

5/1/25:  Web Scenes are now supported

6/14/25:  Updated for ArcGIS API 2.4.1

Known Issues

  • If hosted feature services exist in Enterprise, they will not successfully overwrite when executing the Copy Hosted Feature Services tool.  Will successfully overwrite in AGOL.  Possible bug with ArcGIS API for Python
  • After Story Map is copied to Enterprise, the Story Map must first be opened in Edit mode and published before it can be successfully viewed.  This is not the case for AGOL.  Possible bug with ArcGIS API for Python
Attachments
Comments
RafaelFernandesdeSouza
Emerging Contributor

@JakeSkinner, Yes,

I will send two different screenshots, one without the error, with one webmap, and then, another with the error, when I select the other webmap.

 

OK.pngNoOK.png

JakeSkinner
Esri Esteemed Contributor

@RafaelFernandesdeSouza I would need to take a look at the web map to see what's going on.  Could you share the web map and services to a Group and invite my AGOL account (jskinner_rats) to this Group?

RafaelFernandesdeSouza
Emerging Contributor

@JakeSkinner, I am sorry, but the webmap is from a client.

The difference between the webmap that works fine, and the ones that do not work, is that the webmaps that have feature collections added don't work, and if I remove the feature collections, they work.

Is there any problem with feature collections?

JakeSkinner
Esri Esteemed Contributor

@RafaelFernandesdeSouza I just updated the toolbox validation to exclude feature collections in the Copy Web Map tool.  Re-download the zip file and see if the version works.

RafaelFernandesdeSouza
Emerging Contributor

@JakeSkinner, Now, I got no errors loading the webmap

In this case, I can just add the feature collection layer later, right?

Thank you so much!

I think that the .zip file to download was replaced to only .atbx file.

OfraAi
by
Occasional Contributor

Hello @JakeSkinner 

You've developed a great set of tools. Thank you.

I've used it to copy from AGS 11.3 to AGOL (5.2025) for web maps, dashboard and experience builder. It worked 99%.

In the web maps, the visibility range of non default range in the layers was wrong. Instead of streets - rooms, it was change to streets - building.

I've fixed it easily in the web map designer, but I'm writing it for your knowledge.

Thank you
ofra

 

SedaKahraman
New Contributor

Hello @JakeSkinner 

First of all, thank you very much for the tool, you are great.
I am getting the error shown in the attachment. The portal version is 10.6.1. Could the error be due to the version because I do not encounter any problems when I try it via the 10.9.1 portal url.

SedaKahraman_0-1747993495562.png

 

JakeSkinner
Esri Esteemed Contributor

Hi @SedaKahraman remove the /home/ from your Portal URL.

PeterKnoop
MVP Regular Contributor

@JakeSkinner in order for "Copy Hosted Services.py" to support copying very large hosted feature layers, I would suggest updating your use of the export method to be asynchronous (i.e., set the wait parameter to False, and monitor the export job's progress with status) Otherwise the script can fail unexpectedly due to a timeout.

stevetaylor_perth
Emerging Contributor

Hi Jake,
Thank you for this toolset.
Just noticed that when copying web maps the itemId for the map service does not get updated to new itemId in the destination portal.

The map still draws as it uses the URL of the service, but when going to the Map Item in Portal and clicking on the layer from the item details in Portal it comes up with "item not found", as the itemId is still the source itemId and not the destination itemId.

Is it possible to update the itemIds ?
Thanks

 

stevetaylor_perth_1-1748480106946.png

stevetaylor_perth_2-1748480149178.png

stevetaylor_perth_3-1748480315096.png

 

JakeSkinner
Esri Esteemed Contributor

@stevetaylor_perth this functionality exists in the script:

JakeSkinner_0-1748515818533.png

The script will search each portal using the URL of the service to get the Item Ids.  It will then perform a find/replace within the web map's JSON.  I would search each portal using the URLs to make sure items are being returned.

stevetaylor_perth
Emerging Contributor

Hi Jake - thanks for getting back to me 
I am investigating the issue - seems like the target portal cannot find the itemId by url

Version history
Last update:
Saturday
Updated by:
Contributors