<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Backup AGOL Hosted Feature Layers (aka Hosted Feature Services, aka Hosted Feature Collections) in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1603660#M64335</link>
    <description>&lt;P&gt;Hi Harun,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Happy to hear other people are using this!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use this for ArcGIS Online Hosted Feature Layers, and I come across some layers that are slow to download.&lt;/P&gt;&lt;P&gt;I do not have a right answer for this, but large data sets and or layers with lots of attachments can definitely slow down the process. If you manually export a layer from AGOL or Portal as a GDB a large dataset will take longer than a small one. So these symptoms are across the board, its not only in the script.&lt;/P&gt;&lt;P&gt;To optimize faster downloads, you could break down group layers, relocate attachments to a web service and embed them as links in your layers to take the heavy lifting off your system. We do this for a few layers or else they would be over 10gb easy.&lt;/P&gt;&lt;P&gt;Since I posted this script I have definitely made some changes because have also had issues with some layers timing out when they are attempting to export. I have added a "Retry" action into the script to try at least 3 times if it were to fail.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import os
import datetime as dt
from arcgis.gis import GIS
import certifi
import urllib3
import time

# Suppress only the single InsecureRequestWarning from urllib3 needed for unverified HTTPS requests
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

# Connect to ArcGIS Online or Portal for ArcGIS with certificate verification
gis = GIS("home", verify_cert=certifi.where())

# Set the parent folder path for backups
parent_folder_path = r"FILE LOCATION HERE"

# Create a new folder for today's date (e.g., "2025-02-11 Backup")
today_date = dt.datetime.now().strftime("%Y-%m-%d Full Backup")
folder_path = os.path.join(parent_folder_path, today_date)

# Create the folder if it doesn't exist
if not os.path.exists(folder_path):
    os.makedirs(folder_path)

# Define the number of items to fetch
num_items = 1000

# Search for the most recently modified feature services
query_string = "type:Feature Service"
items = gis.content.search(query=query_string, max_items=num_items, sort_field='modified', sort_order='desc')

# Print the number of items to be backed up and their details
print(str(len(items)) + " items will be backed up to " + folder_path + ". See the list below:")
for item in items:
    print(item.title)

# Function to download items as file geodatabases with retry mechanism
def download_as_fgdb(item_list, backup_location, max_retries=3):
    for item in item_list:
        retries = 0
        while retries &amp;lt; max_retries:
            try:
                if 'View Service' in item.typeKeywords:
                    print(item.title + " is a view, not downloading")
                    break
                else:
                    print("Downloading " + item.title)
                    version = dt.datetime.now().strftime("%d_%b_%Y")
                    result = item.export(item.title + "_" + version, "File Geodatabase")
                    result.download(backup_location)
                    result.delete()
                    print("Successfully downloaded " + item.title)
                    break
            except Exception as e:
                retries += 1
                print(f"An error occurred downloading {item.title}: {str(e)} (Retry {retries}/{max_retries})")
                if retries &amp;lt; max_retries:
                    time.sleep(5)  # Wait for 5 seconds before retrying
                else:
                    print(f"Failed to download {item.title} after {max_retries} retries")
    print("The function has completed")

# Call the function to download items
download_as_fgdb(items, folder_path)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Apr 2025 11:24:21 GMT</pubDate>
    <dc:creator>Nick_Creedon</dc:creator>
    <dc:date>2025-04-08T11:24:21Z</dc:date>
    <item>
      <title>Backup AGOL Hosted Feature Layers (aka Hosted Feature Services, aka Hosted Feature Collections)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1063049#M40318</link>
      <description>&lt;DIV class="lia-message-template-symptoms-zone"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-template-solution-zone"&gt;&lt;P&gt;Here is an example python script that can be run to specifically backup hosted feature layers from ArcGIS Online to a local drive or network drive on your computer or network. Although not ideal to code in credentials, if it is stored and ran from a secure machine, it can be scheduled to run automatically with Windows Task Scheduler. Alternatively, you can run this script manually and alter it to prompt you for credentials. Thanks to Adam Koelker for presenting the core of this script via YouTube. I adapted to query and loop through a specific set, and added some print statements.&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;from time import strftime
print (strftime("%c"))
from arcgis.gis import GIS

###Authenticate to ArcGIS Online
gis=GIS("https://yourorganization.maps.arcgis.com","yourUsername","yourPassword")

###Query to for all items to be downloaded. In this case, it's searching for all feature layers marked as authoritative
myFeatureCollections=gis.content.search(query="contentstatus:org_authoritative",item_type="Feature Layer Collection",max_items=1000)

###Output location for downloaded backups
output=r"C:/path/to/output/location"

###Initiate cycle to export, download, and delete backups
for item in myFeatureCollections:
	try:
		print('Exporting '+str(item.title))
		currentItemID=item.itemid
		dataitem=gis.content.get(currentItemID)
		### Create Backup
		tempfile=strftime(dataitem.title+"_backup_%Y%m%d")
		dataitem.export(title=tempfile,export_format="File Geodatabase",parameters=None,wait=True)
	except:
		print("Could not create backup for "+str(item.title)+' ('+str(item.itemid)+')')
		pass
	try:
		### Find and download export
		myexport=gis.content.search(tempfile,item_type="File Geodatabase")
		fgdb=gis.content.get(myexport[0].itemid)
		fgdb.download(save_path=output)
		print("Downloaded "+str(fgdb.title)+" to "+output)
	except:
		print("Could not download export for "+str(myexport[0]))		
		pass
	try:
		###Delete export
		fgdb.delete()
	except:
		print("Could not delete export for "+str(fgdb))
		pass


print("Script completed at {}".format(strftime("%c")))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: This query no longer retrieves explicitly hosted feature layers, but also stored web layers. See&amp;nbsp;&lt;A href="https://developers.arcgis.com/rest/users-groups-and-items/items-and-item-types.htm" target="_blank"&gt;https://developers.arcgis.com/rest/users-groups-and-items/items-and-item-types.htm&lt;/A&gt;&amp;nbsp;for updated item types that can be queried&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 19:19:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1063049#M40318</guid>
      <dc:creator>NorthSouthGIS</dc:creator>
      <dc:date>2022-02-18T19:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Backup AGOL Hosted Feature Layers (aka Hosted Feature Services, aka Hosted Feature Collections)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1336471#M54975</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/66217"&gt;@NorthSouthGIS&lt;/a&gt;,&amp;nbsp;this is exactly what I have been looking for, I currently run a similar script that I've picked up somewhere online in which I need to enter in my credentials, the location to save the data to and the number of hosted feature layers to backup. So this is great.&amp;nbsp;&lt;BR /&gt;I have added the script to a notebook in AGOL so that I can schedule it to run when I am away. I've done a test run and everything seems to complete without an issue. However, when I go to check my backup location (D:\Northumberland_PP\Back_ups\Automated_backups) there is nothing there.&amp;nbsp;&lt;BR /&gt;You don't happen to have any thoughts on why this might be do you?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 05:54:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1336471#M54975</guid>
      <dc:creator>AndrewHankinson</dc:creator>
      <dc:date>2023-10-10T05:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Backup AGOL Hosted Feature Layers (aka Hosted Feature Services, aka Hosted Feature Collections)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1379793#M57359</link>
      <description>&lt;P&gt;Hi Andrew,&lt;/P&gt;&lt;P&gt;Did you ever figure this out? Having the same issue. Tried reversing the backslashes, using a simple Temp folder on my C: drive, using a UNC file path, etc.&lt;/P&gt;&lt;P&gt;Teri&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 17:01:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1379793#M57359</guid>
      <dc:creator>TeriL</dc:creator>
      <dc:date>2024-02-08T17:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: Backup AGOL Hosted Feature Layers (aka Hosted Feature Services, aka Hosted Feature Collections)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1380122#M57381</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/597321"&gt;@TeriL&lt;/a&gt;,&amp;nbsp;I didn't find a way to get it to work unfortunately and then it dropped off my radar. Perhaps I'll contact ESRI to see if they can advise&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 00:37:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1380122#M57381</guid>
      <dc:creator>AndrewHankinson</dc:creator>
      <dc:date>2024-02-09T00:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: Backup AGOL Hosted Feature Layers (aka Hosted Feature Services, aka Hosted Feature Collections)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1385845#M57649</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/418801"&gt;@Teri&lt;/a&gt;&amp;nbsp;, I contacted ESRI abouth this and they suggested I post on here. See the below.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;I have had a further look into your case, and as you are using ArcGIS Api for Python you require a developer support subscription for further support on this.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I would recommend that you post a thread on the page that you found the notebook script on to find a solution.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;As this is out of scope of regular support I will move to close the case&lt;BR /&gt;&lt;BR /&gt;You haven't happened to find a solution have you?&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Feb 2024 03:38:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1385845#M57649</guid>
      <dc:creator>AndrewHankinson</dc:creator>
      <dc:date>2024-02-23T03:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Backup AGOL Hosted Feature Layers (aka Hosted Feature Services, aka Hosted Feature Collections)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1523727#M60946</link>
      <description>&lt;P&gt;I have always had issues running it in AGOL, it downloads the files but they actually don't make it to your computers directory, they actually stay in AGOL they fall into your Notebook's Files so it is best to run this on your computer locally through ArcGIS Pro (which uses task scheduler) or just task scheduler. Computer just needs to be on, ArcGIS Pro doest need to be open.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 12:04:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1523727#M60946</guid>
      <dc:creator>Nick_Creedon</dc:creator>
      <dc:date>2024-08-19T12:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Backup AGOL Hosted Feature Layers (aka Hosted Feature Services, aka Hosted Feature Collections)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1523728#M60947</link>
      <description>&lt;P&gt;I'm attaching the script I compiled and use.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 12:05:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1523728#M60947</guid>
      <dc:creator>Nick_Creedon</dc:creator>
      <dc:date>2024-08-19T12:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Backup AGOL Hosted Feature Layers (aka Hosted Feature Services, aka Hosted Feature Collections)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1538758#M61492</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/707148"&gt;@Nick_Creedon&lt;/a&gt;,&amp;nbsp;thanks for this works great.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 00:53:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1538758#M61492</guid>
      <dc:creator>AndrewHankinson</dc:creator>
      <dc:date>2024-09-16T00:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Backup AGOL Hosted Feature Layers (aka Hosted Feature Services, aka Hosted Feature Collections)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1603580#M64331</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/707148"&gt;@Nick_Creedon&lt;/a&gt;, thanks for sharing this! I am using this script to download Hosted Services from ArcGIS Enterprise and it works great. However, the download for some services seems to be very slow, maybe I think its due to the size of the hosted data? Do you have any thoughts on optimizing this script for faster downloads?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Also, it failed to download some of the hosted services and also ignored some of the hosted service while the script was running. Do you have any idea why that's happening?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 06:55:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1603580#M64331</guid>
      <dc:creator>HarunJoeVellikkara</dc:creator>
      <dc:date>2025-04-08T06:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Backup AGOL Hosted Feature Layers (aka Hosted Feature Services, aka Hosted Feature Collections)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1603660#M64335</link>
      <description>&lt;P&gt;Hi Harun,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Happy to hear other people are using this!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use this for ArcGIS Online Hosted Feature Layers, and I come across some layers that are slow to download.&lt;/P&gt;&lt;P&gt;I do not have a right answer for this, but large data sets and or layers with lots of attachments can definitely slow down the process. If you manually export a layer from AGOL or Portal as a GDB a large dataset will take longer than a small one. So these symptoms are across the board, its not only in the script.&lt;/P&gt;&lt;P&gt;To optimize faster downloads, you could break down group layers, relocate attachments to a web service and embed them as links in your layers to take the heavy lifting off your system. We do this for a few layers or else they would be over 10gb easy.&lt;/P&gt;&lt;P&gt;Since I posted this script I have definitely made some changes because have also had issues with some layers timing out when they are attempting to export. I have added a "Retry" action into the script to try at least 3 times if it were to fail.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import os
import datetime as dt
from arcgis.gis import GIS
import certifi
import urllib3
import time

# Suppress only the single InsecureRequestWarning from urllib3 needed for unverified HTTPS requests
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

# Connect to ArcGIS Online or Portal for ArcGIS with certificate verification
gis = GIS("home", verify_cert=certifi.where())

# Set the parent folder path for backups
parent_folder_path = r"FILE LOCATION HERE"

# Create a new folder for today's date (e.g., "2025-02-11 Backup")
today_date = dt.datetime.now().strftime("%Y-%m-%d Full Backup")
folder_path = os.path.join(parent_folder_path, today_date)

# Create the folder if it doesn't exist
if not os.path.exists(folder_path):
    os.makedirs(folder_path)

# Define the number of items to fetch
num_items = 1000

# Search for the most recently modified feature services
query_string = "type:Feature Service"
items = gis.content.search(query=query_string, max_items=num_items, sort_field='modified', sort_order='desc')

# Print the number of items to be backed up and their details
print(str(len(items)) + " items will be backed up to " + folder_path + ". See the list below:")
for item in items:
    print(item.title)

# Function to download items as file geodatabases with retry mechanism
def download_as_fgdb(item_list, backup_location, max_retries=3):
    for item in item_list:
        retries = 0
        while retries &amp;lt; max_retries:
            try:
                if 'View Service' in item.typeKeywords:
                    print(item.title + " is a view, not downloading")
                    break
                else:
                    print("Downloading " + item.title)
                    version = dt.datetime.now().strftime("%d_%b_%Y")
                    result = item.export(item.title + "_" + version, "File Geodatabase")
                    result.download(backup_location)
                    result.delete()
                    print("Successfully downloaded " + item.title)
                    break
            except Exception as e:
                retries += 1
                print(f"An error occurred downloading {item.title}: {str(e)} (Retry {retries}/{max_retries})")
                if retries &amp;lt; max_retries:
                    time.sleep(5)  # Wait for 5 seconds before retrying
                else:
                    print(f"Failed to download {item.title} after {max_retries} retries")
    print("The function has completed")

# Call the function to download items
download_as_fgdb(items, folder_path)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 11:24:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1603660#M64335</guid>
      <dc:creator>Nick_Creedon</dc:creator>
      <dc:date>2025-04-08T11:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Backup AGOL Hosted Feature Layers (aka Hosted Feature Services, aka Hosted Feature Collections)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1604062#M64356</link>
      <description>&lt;P&gt;Thank you so much&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/707148"&gt;@Nick_Creedon&lt;/a&gt; for the prompt response! I will give it a shot and let you know.&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 06:56:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1604062#M64356</guid>
      <dc:creator>HarunJoeVellikkara</dc:creator>
      <dc:date>2025-04-09T06:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Backup AGOL Hosted Feature Layers (aka Hosted Feature Services, aka Hosted Feature Collections)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1604128#M64360</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/707148"&gt;@Nick_Creedon&lt;/a&gt;&amp;nbsp;sorry to bother you! You have been very helpful.&lt;/P&gt;&lt;P&gt;I had a query since I am running this script for ArcGIS Enterprise is there a way we can tweak this script to get only Hosted Feature services. Since,&amp;nbsp;query_string = "type:Feature Service" includes both Hosted and Referenced services right?&lt;/P&gt;&lt;P&gt;Also, do you think taking a GeoJson backup would be as helpful as taking a File Geodatabase backup? For example if one of my hosted service is corrupted/deleted which one would be more feasible to restore (JSON Vs Fgdb).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 11:49:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1604128#M64360</guid>
      <dc:creator>HarunJoeVellikkara</dc:creator>
      <dc:date>2025-04-09T11:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Backup AGOL Hosted Feature Layers (aka Hosted Feature Services, aka Hosted Feature Collections)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1604151#M64361</link>
      <description>&lt;P&gt;These are good questions,&lt;/P&gt;&lt;P&gt;Referenced services like versions or "View Layers"? To my understanding it will try to export the versioned layer but it will fail and only export the parent. If this is what you are referring too. I have lots of view layers and they don't make it into my backups.&lt;/P&gt;&lt;P&gt;I left this out of my previous messages, but you could specify "Tags" for your backups so you only backup specific layers and not your whole organization every time. I do weekly backups of specific tagged layers and quarterly backups of the whole organization.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nick_Creedon_0-1744203097033.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/129779iFA8ED63C8D002B87/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nick_Creedon_0-1744203097033.png" alt="Nick_Creedon_0-1744203097033.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have never worked with JSON, I cannot answer that question. I would love to get to understand its uses.&lt;/P&gt;&lt;P&gt;If you deploy a layer from ArcGIS Pro to Portal or AGOL, you create a Service Definition. I have pulled a service definition back to use the original schema and used data from a FGDB to fix a layer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe this is the JSON? I don't know.&lt;/P&gt;&lt;P&gt;To download Service Definitions the section would look something like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nick_Creedon_1-1744203435799.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/129780i55710070C3559349/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nick_Creedon_1-1744203435799.png" alt="Nick_Creedon_1-1744203435799.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I need to update this script to Retry if one fails to download.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 12:59:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1604151#M64361</guid>
      <dc:creator>Nick_Creedon</dc:creator>
      <dc:date>2025-04-09T12:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Backup AGOL Hosted Feature Layers (aka Hosted Feature Services, aka Hosted Feature Collections)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1604560#M64375</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/707148"&gt;@Nick_Creedon&lt;/a&gt;&amp;nbsp;for the detailed explanation! Appreciate all your help so far. Cheers!!!&lt;span class="lia-unicode-emoji" title=":clinking_glasses:"&gt;🥂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 08:48:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/backup-agol-hosted-feature-layers-aka-hosted/m-p/1604560#M64375</guid>
      <dc:creator>HarunJoeVellikkara</dc:creator>
      <dc:date>2025-04-10T08:48:06Z</dc:date>
    </item>
  </channel>
</rss>

