Unable to export AGOL hosted feature service successfully

400
4
Jump to solution
11-10-2021 02:12 PM
Trippetoe
Occasional Contributor III

Hello.

I would like to Export an AGOL hosted feature service.  The feature service contains one layer with attachments enabled and 3 related tables.  The hosted feature service works just great - its used daily by our field crews, admin staff, etc.  I just want to get the data from AGOL for backup purposes.

On the Overview page of the service, I can see that the Size is 91MB and the Attachments Size is 37,644 MB (lots of photos for sure).  

I click the Export button and select File Geodatabase.  The expected dialog box opens where I set the title, tags, summary, etc. I then click Export.  I can then see the message 'exporting.....' displayed in the dialog box.   I can leave that web page, grab some lunch, and maybe get in a run, etc.  After an hour+ the 'exporting...' message goes away, and the zipped version of the file geodatabase export is available in my content folder.

On the Overview page of the File Geodatabase export, i can see that the Size is 91MB. I click the Download button, but the ZIP package that gets downloaded to my local machine is 1KB in size and cannot be opened.  Additionally if i try to Publish the File Geodatabase export in AGOL, that doesn't work either. I'm taken to a new Overview page - ostensibly for the just published service-, but I get a error message which says 'Undefined'.

How can I export my data out of AGOL?

Thank you.

0 Kudos
1 Solution

Accepted Solutions
MicZatorsky_AEC
Occasional Contributor II

I've had mixed success downloading FGDBs with attachments from AGOL.  Sometimes, it works taking more than two hours for 2GB of attachments.  Other times, it runs for longer (>3 hours) and I give up.  I can't say it failed as there is no explicit error.  If it fails, it fails silently.

What is working reliably is to open the hosted feature layer in a Pro Map, right-click Export Data which launches Feature Class to Feature Class, check the environment includes attachments and keep source GUIDs, point it towards your local FGDB then let it run.  For small feature classes with a large attachment volume, it will reach 100% quickly then sit on 100% for a lot longer.  So far it has worked well with record volumes up to 12k and attachment volumes up to 14k and run times > 3 hours).   A side benefit is you don't end up with a copy of a large FGDB on AGOL consuming credits.

View solution in original post

4 Replies
MicZatorsky_AEC
Occasional Contributor II

I've had mixed success downloading FGDBs with attachments from AGOL.  Sometimes, it works taking more than two hours for 2GB of attachments.  Other times, it runs for longer (>3 hours) and I give up.  I can't say it failed as there is no explicit error.  If it fails, it fails silently.

What is working reliably is to open the hosted feature layer in a Pro Map, right-click Export Data which launches Feature Class to Feature Class, check the environment includes attachments and keep source GUIDs, point it towards your local FGDB then let it run.  For small feature classes with a large attachment volume, it will reach 100% quickly then sit on 100% for a lot longer.  So far it has worked well with record volumes up to 12k and attachment volumes up to 14k and run times > 3 hours).   A side benefit is you don't end up with a copy of a large FGDB on AGOL consuming credits.

Trippetoe
Occasional Contributor III

Thank you for the suggestion. I'll get a big cup of my favorite beverage, a donut or two, and fire up Pro.  I'll let you know how it goes. 

I'm guessing that i will have to download the main layer with the attachments and the three related tables separately. I suspect all relationships will be maintained, or i can just recreate them in Pro.

 

0 Kudos
Trippetoe
Occasional Contributor III

Hey @MicZatorsky_AEC 

Your suggestion worked out well - i didn't even have time to finish the entire drink 🙂  As expected, I had to download each related table separately and then recreate the relationship class.

One problem i ran into, however, is that the export of one of my tables dropped all the subtypes that were in the related table. Do you have any idea how to make sure that Export preserves those subtypes? It's not impossible to (re)create them, but it sure is tedious.

 

0 Kudos
MicZatorsky_AEC
Occasional Contributor II

Sorry, I have no expertise in subtypes.  But when I hear tedious I think Python.   A script with the right mix of ListSubtypes and AddSubtype might work

0 Kudos