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:
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.
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
@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.
@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?
@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?
@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.
@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.
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
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.
Hi @SedaKahraman remove the /home/ from your Portal URL.
@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.
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 this functionality exists in the script:
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.
Hi Jake - thanks for getting back to me
I am investigating the issue - seems like the target portal cannot find the itemId by url