In a previous blog (https://community.esri.com/t5/arcgis-hub-blog/cloning-a-site-within-hub/ba-p/1539091), I shared steps to clone a site within an organization. Here’s another important use case we often get asked about: how to clone an Enterprise site to Hub and vice-versa. Here are the steps and actions to clone the site item along with associated site pages and groups.
Steps to Clone an Enterprise Site to Hub:
1. Create a Notebook –
2. Connect to your GIS
3. Install the required library
pip install -e git+https://github.com/esri/hub-py.git#egg=arcgishub
4. Log in to your ArcGIS Enterprise account
eHub = Hub("url", "username")
5. Fetch the site to clone
e_site = eHub.sites.get('ID of the site you want to clone')
e_site.item
6. Log in to your Hub account
hub_basic = Hub("url", "username")
7. Clone the site
site_cloned = hub_basic.sites.clone(e_site)
site_cloned.item
For the use case, cloning a Hub site to Enterprise, execute the first four steps above and follow the following steps:
5. Log in to your Hub account
hub_basic = Hub("url", "username")
6. Fetch the site to clone
site = hub_basic.sites.get('ID of the site you want to clone')
site.item
7. Log in to your ArcGIS Enterprise account
eHub = Hub("url", "username")
8. Clone the site
site_cloned = eHub.sites.clone(site)
site_cloned.item
Note: If you do not have ArcGIS Notebooks, you can run it in your local Jupyter Notebooks.
Please share your feedback or ideas for further enhancements through the ArcGIS Hub Ideas board in Esri Community.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.