Select to view content in your preferred language

Cloning content from ArcGIS Portal to ArcGIS Online

2071
8
07-23-2020 04:39 AM
ChrisBuckmaster2
Occasional Contributor

Hi

I would like to be able to clone items from our organisation's internal ArcGIS Portal to our external ArcGIS Online enterprise and am following the clone_items option using the ArcGIS Python API, but am receiving a connection error:

urllib.error.URLError: <urlopen error [WinError 10061] No connection could be made because the target machine actively refused it>

I haven't had any problems connecting to ArcGIS Online so am wondering what the issue might relate to?

Thanks

0 Kudos
8 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Chris,

If you're copying hosted feature services, you may want to give the following tool a try:

Copy Content Between Portals 

Also, another option would be to use Distributed Collaboration.

0 Kudos
ChrisBuckmaster2
Occasional Contributor

Hi Jake

The service I am trying to clone isn't a hosted service, it is a feature layer from our federated REST service, does this mean it may not be able to access the service if it isn't hosted?

I have looked at distributed collaboration but this entails modifying our ArcSDE data (either adding global IDs or versioning data) which we do not want to do, hence why I am now looking at the cloning option.

0 Kudos
JakeSkinner
Esri Esteemed Contributor

Global IDs are required for federated services.  I'm curious, what would be the reason you don't want to enable Global IDs?

0 Kudos
ChrisBuckmaster2
Occasional Contributor

That's odd, our services don't seem to contain global IDs within the federated REST service layers from what I can see?

I was under the impression that global IDs had to be generated separately using the ESRI toolbox to prep layers before loading onto ArcGIS Portal?

I believe our concern is more in that we would have to version all of our data (which could increase storage on our database) and then re-publish to try and get the collaboration working; we don't want to alter existing datasets so are now looking more towards scripting options to try and update layers on ArcGIS Online, unless there is an efficient way of doing this without re-publishing / altering how our datasets are structured in SDE?

0 Kudos
JakeSkinner
Esri Esteemed Contributor

I should have been more clear in my statement.  Global IDs are required for federated services that will participate in Distributed Collaboration.

You won't have to version your feature classes, but you will have to add Global IDs if you want to have the service collaborate.  This won't require you to re-publish your existing services.  You would just have to stop the service, add Global IDs, and then start the service back up.

0 Kudos
ChrisBuckmaster2
Occasional Contributor

Hi Jake

Thanks for the clarification - I was under the impression that the data had to also either be versioned or archive enabled as well?

We ideally want to avoid changing the structure of the existing datasets and therefore collaboration will probably not work in this situation.

Regarding the original question, is the error a result of the service not being hosted, or something related to the connection?

Otherwise, are there alternative ways to take services from our federated server and create hosted ArcGIS Online services and update as required?

Thanks

0 Kudos
JakeSkinner
Esri Esteemed Contributor

I was under the impression that the data had to also either be versioned or archive enabled as well?

   No, the data will not have to be versioned or archived.

The original error you received seems to be related to the connection.  However, the clone items function will not convert an arcgis server map/feature service to an AGOL hosted feature service.  Even if you have the option copy_date=True for the function.  It will create a new item in ArcGIS Online referencing the map/feature service from your ArcGIS Server instance.

Distributed Collaboration would be the easiest, and I would still push towards this.  Adding Global IDs will only add an additional field to the feature class.  The only other option would be to manually overwrite the AGOL hosted feature service whenever there's an update to the ArcGIS Server service.  You could schedule a python script to do this using Windows Task Scheduler.  Here is one script that you could use. 

0 Kudos
ChrisBuckmaster2
Occasional Contributor

Thanks for the clarification and advice Jake.

0 Kudos