I have been successful migrating content with <1,000 Records using the 4-liner mentioned here.
I get the "_ItemCreateException: ('Failed to create Feature Service..." error when attempting to "clone_content" for a layer with ~13,000 records. When I set copy_data=False I get it to Portal with no records, so I'm assuming its the record count? I am using the "content.clone_items" api module..
Here is a snippet of my code (successful):
source_Hazs = GIS("https://dtsc.maps.arcgis.com",os.environ['AGOL_Username'],os.environ['AGOL_Password'])
target_Hazs = GIS("https://maps.dtsc.ca.gov/dtscportal/home/",os.environ['Portal_Username'],os.environ['Portal_Password'],copy_data=True)
item = source_Hazs.content.get("e4a9000d007d4e4c8963bb77ab03f1ff")
target_Hazs.content.clone_items([item],folder=None, item_extent=None, use_org_basemap=True, copy_data=True, search_existing_items=True, item_mapping=None, group_mapping=None, owner=None)
Does anyone have any advice they can share?
You can try to set copy_data=False: https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=clone_items#arcgis....