Determining the best way to migrate your content between ArcGIS Online and ArcGIS Enterprise accounts can be complex. First, what type of migration are you trying to accomplish? What type of content do you want to migrate? How many items are you looking to migrate? Why are you looking to migrate? And finally, what technical skills in programming exist within your organization? This second part of the blog post is meant to introduce you to the tools available to migrate content between ArcGIS Online and ArcGIS Enterprise or between two ArcGIS Enterprise accounts. The first part of the blog post can be found here.
Have you ever had to migrate your content between your different ArcGIS Online or ArcGIS Enterprise accounts? These migrations can occur as a result of a departmental transition, a service move or a decision to switch from ArcGIS Online to ArcGIS Enterprise or vice-versa. One of the reasons could be the desire to have a preproduction and a production environment allowing access to the general public. When making a decision, there are several things to consider. Mainly:
- Which environments do we want to migrate between? Two ArcGIS Online accounts? An ArcGIS Online account and an ArcGIS Enterprise account? Two ArcGIS Enterprise accounts?
- What types of content will be migrated? Hosted feature layers? Interactive maps? Web applications?
- How many items need to be migrated?
- Do you have someone in your organization who is proficient with the ArcGIS for Python API?
Throughout this post, we will use the term source to describe the account from which the data originated and the term target as the destination account for the data.
Although there are several solutions, it is important to test and document the migration, as there is no perfect solution and some applications require custom migration. In addition, technologies change rapidly, so it is important to stay on top of new products and methodologies. You can always contact Esri Canada's Professional Services team for assistance with the migration.
An example of a potential architecture during distributed collaboration. An organization shares its ArcGIS Enterprise content with its ArcGIS Online account to share its content publicly or with other ArcGIS Online organizations.
The distributed collaboration is a collaboration that can be done between several ArcGIS Enterprise accounts or between one ArcGIS Online and several ArcGIS Enterprise accounts. This collaboration works with a “host” that initiates collaboration with some “guests” who accept to be part of the collaboration. During the distributed collaboration, each organization assigns a group to the “workspace” or synchronization of the content happens. The content can be shared as a “reference” or as a “copy”.
Important: If the content is a service such as a network service, a map or a geocoding service (see list of services), the content will only be shared as a reference and not as a copy. If migration contains apps or web maps, you also need to ensure that all the hosted feature layers consumed by the app or the map are part of the group. Also, the maps and apps will still reference the URL of the feature layers hosted in the source account. You will therefore need to modify the source of the layers for each of the maps and apps so that they reflect the URL of the target account.
ArcGIS Online Assistant and ArcGIS Assistant (Beta)
The ArcGIS Online Assistant and ArcGIS Assistant (Beta) apps can also be used to transfer the data between ArcGIS Online and ArcGIS Enterprise, as mentioned in Part 1 of this blog. However, to use ArcGIS Assistant with ArcGIS Enterprise, you will need to add app to its portal as a web app and use the app indentifier to access the ArcGIS Assistant site, as shown in the example below.
Process for saving apps within the ArcGIS Enterprise portal in order to access ArcGIS Assistant.
The required identifier to connect to ArcGIS Assistant.
Important: As mentioned in Part 1 of the blog, neither of the ArcGIS Online Assistant or ArcGIS Assistant apps are supported by Esri. These are apps developed internally to facilitate the work of the professional services team members (see the user guide). Although these apps can be sufficient for your needs, they are not supported by Esri. As such, there is no support team should you experience difficulties or should you accidentally edit your content. These apps can be used for ArcGIS Online, ArcGIS Enterprise or a transfer between the two.
The ArcGIS API for Python
The ArcGIS API for Python interface can also be used for migrating the content between ArcGIS Enterprise and ArcGIS Online by using the “Clone_Items” function. The function has the advantage of performing what is called deep cloning, leading to a total migration of the referenced content in an app or a web map without requiring intervention from the administrator. This option also allows group migration. The ArcGIS API for Python interface is mentioned in greater detail in Part 1 of this blog, as the function is identical for ArcGIS Online or ArcGIS Enterprise. For more information, you can also refer to this blog published by an Esri Canada colleague, Amanda De Medeiros.
Important: This method does not allow cloning of elements such as mapping services and non-hosted feature layers (layer in reference to an enterprise geodatabase). Migration could occur but the URL will always refer the source account.
Export (EPK) Package
The export group is the most recent method of enabling migration between two ArcGIS Enterprise accounts. Note that this method is supported solely with ArcGIS Enterprise. The progress requires a group from the source to be exported as an export group (EPK file), then imported as an EPK to a group in the ArcGIS Enterprise account of the target. This method can be accomplished by accessing the REST API of your ArcGIS Enterprise portal (Esri blog) or by again using the ArcGIS API for Python with the GroupMigrationManager module (GitHub directory). The Python API offers more automation opportunities and allows the development of tools specific to your organization.
ArcGIS Enterprise portal REST API interface. You can see, in yellow, the group export or import functions between the two ArcGIS Enterprise accounts.
Contrary to cloning, the EPK method requires that all content related to the web app or web map be shared with the group in order to migrate the content properly. However, like cloning, modifying the URL from account B (the target) is done automatically and will not require the administrator’s intervention.
Important: This method does not allow migration of elements such as mapping services and non-hosted feature layers (layer in reference to an enterprise geodatabase). The group will thus contain only the eligible content. The list of elements that can be migrated in EPK group can be found here.
Although there are multiple possibilities for migrating content, you should consider the type of environment (ArcGIS Online and ArcGIS Enterprise), as well as the type of content. Non-hosted services like mapping services cannot be copied entirely. Some of the listed methods may allow migration as a reference, but the service URL will always stay with the source account. Manual methods like collaboration and ArcGIS Assistant app can be effective for migrating a small number of elements, for example, a web app that is ready for release to the public. However, the non-automated process can lead to usage errors, for example, forgetting to replace the URL of the feature layers with that of the target account. On the other hand, automated processes like using ArcGIS API for Python and group export (EPK) can make it easier to migrate large content such as an entire group. However, they can still accidentally lead to serious errors like deleting groups from the source. It is therefore very important to test and document the migration with non-essential content before migrating. If your organization does not feel comfortable with the migration, you can always reach out to Esri Canada's Professional Services team.
Other interesting resources
This post was written in French by Tristan Gingras-Hill and can be viewed here.