Select to view content in your preferred language

Is there a workflow to backup Collector while in offline mode?

3698
12
08-02-2016 03:53 PM
NathanEnge
Esri Contributor

Hi folks

We have the need to use Collector in offline mode for at least a week during field season. Although our devices are charged regularily and have access to be connected to our mobile workstations, there is still no wifi or cell ranges to sync to AGO.

In order to mitigate the risk of losing collected data on devices due to hardware failure, is there a workflow where the data can be backed up through iTunes or the file system (for android).

0 Kudos
12 Replies
zkovacs
Frequent Contributor

Nathan

You can find the collected offline data in the ../ArcGIS_Collector/offline_data/ folder on your Android phone. If you have only one survey downloaded for offline use to the device, it's easy to find the subfolder as there will only be one. Project folders are named with a unique id (not sure, but this might be the replica ID generated by the API) instead of a readable name. When you found the project folder in question, there will be a number of runtime GDB files with the extension of ".geodatabase" (depending on the number of FS used). Simply copy the whole folder to back it up (the process should be similar on iOS). You can turn the runtime GDBs in to file GDBs by using the 'Copy Runtime Geodatabase to File Geodatabase' tool in ArcGIS (at least in 10.3).

(Alternative workflow here.)

I hope this helps.

Zoltan

NathanEnge
Esri Contributor

Thanks zoltan

do you know if there is a similar workflow in the iOS? iTunes doesn't give access to the file structure, nor does just browsing to the device.

May have to use something like iFile?

0 Kudos
zkovacs
Frequent Contributor

Hi Nathan

The workflow is fairly similar, although you need to retrieve the content in a different way, since there are restircitions on iOS devices.

1. Using iTunes:

Click on Apps and browse to the bottom of the screen where there is a list of your installed apps which content you can manage from iTunes. Select 'Collector' to see the documents list and then click on the folder with the AGOL username you want to save/backup. Select 'Save' to copy that folder to your PC.

Depending on the size of the folder (attachments, etc), it might take a while to copy.

2. Use a 3rd party app like iExplorer, iFunBox, etc to get access to the file system and only grab the folder/data you need.

Hope this helps.

JosephMcGehan
Occasional Contributor

.. I'd like to use py to automate the above. I'd like to back up all runtime geodatabase, then programaticllay replicate changes against a local master, and pass the runtime geodatabase back.  

0 Kudos
zkovacs
Frequent Contributor

Hi Joseph,

Not sure how you would access iOS content using Python to be honest. I did a google search but couldn't find any Python module that would allow browsing content on iOS devices. This may have to do with the way iOS is architected: you don't have access to the entire file system by default. It is called sandboxing and is for security reasons: no app (or its data or files) can directly communicate with another app (with some exceptions of course) and use information/data from them.

Most 3rd party desktop apps that allow browsing iOS content rely on iTunes to do this. (iTunes includes a type library that you could use to access its object model after you imported it into your C++ project for example.) I think your first hurdle wold be actually accessing folders/files on iOS devices. After that, there would be the issue of identifying the correct local Collector folder you need for each project - they seem to be named with a unique id (starting with the AGOL username, followed by possibly the replica ID generated by the API) instead of a readable name that may make it hard to programme...

Anyway, if you find a way to do it in Python it would be great to see how you achieved it. I hope this helps.

Zoltan

0 Kudos
DougBrowning
MVP Esteemed Contributor

I got this to work in Android copying TO the device... until v6 or v7 came out.  Google now names the sd card a random number so you cannot program it.

0 Kudos
DougBrowning
MVP Esteemed Contributor

This would be connecting to a computer though.  

Has anyone done this totally offline?  My idea is to use a USB stick plugged into the tablet.  I am ordering some to test but have not got them yet.

thanks

0 Kudos
zkovacs
Frequent Contributor

Yes, it's via a PC. I haven't tried a fully offline workflow as I never had the need. It should be OK on Android as you can copy files to/from SD card and/or USB sticks easily - internal naming is a different matter. iOS doesn't support OTG USB - or at least not without special cables/USB sticks. Then there is the issue of browsing and copying content to the USB stick due to sandboxing (you cannot access the full file system). I hope this helps.

0 Kudos
DougBrowning
MVP Esteemed Contributor

I got a USB stick for the iPad today.  The Sandisk software that came with it will only backups photos.

I then tried Files app and here is where is gets weird.  I can see the Collector folders and back them up.  But for some reason I do not see 123 folders at all.  I know some of this is iOS blocking the file system but if Collector was able to do it then it can be done. 

Other idea is - in the Settings -> Storage add a button "Backup database to another location".  How cool would that be!  Should be pretty easy also.  Just click Backup then pick a spot.  Could even point it to a cloud service.  Please consider it.

We go on 8 day long outings at times.  If on day 8 we break a tablet we lose ALL of the data.  That means we lose lots of money.  Is there any plan for this at all?  So far I we tell the client - there is no way to backup in the field, and there is no way to back up AGOL (which is weird cause this could be a big money maker for Esri), and all our master forms are in a location that is not backed up by IT.  This is a ton of risk at every level and is not going over well.

Any ideas 123 team?

Next try is Android.

thanks!

0 Kudos