Replacing data on the server

Topic 1: Replacing data on the server

Greetings,

We are moving into “production mode” with our data collection app (measuring trees and other attributes in permanent plots). Up to this point, we’ve been using a sample data set to test and troubleshoot issues with the app. Our next step is to completely replace the sample data that currently resides on the server and tablets with the data we need for the upcoming field season. My understanding is that we can do this in two ways:

  1. Via the tablet (3 steps): (a) replace the sample data on the tablet with the new data (we use a csv file of the previous measurement data), (b) tap on the “Reset Server” box at the lower right-hand corner of the synchronization screen, and © synchronize with the server. Does this completely replace the data on the server, or does it just add the rows of new data to the old sample data? As a follow up to this, how do we prevent someone from inadvertently resetting the server?

  2. Via ODK-X Suitcase: From the Suitcase documentation (ODK-X Suitcase — ODK-X Docs), this looks to be the way to do it (quoted from the documentation): “To update the data on the server you need a correctly formatted CSV – follow the instructions for Preparing your CSV for upload and use the following command to upload it to the server to table table_id of app default with username user and password pass from ~/Desktop/correctly_formatted.csv and save the log to ~/Desktop/log.txt

java -jar ‘path/to/jar.jar’ -update -cloudEndpointUrl ‘https://your-endpoint-server.com’ -appId ‘default’ -tableId ‘table_id’ -username ‘user’ -password ‘pass’ -path ‘~/Desktop/correctly_formatted.csv’ -updateLogPath ‘~/Desktop/log.txt’ -dataVersion 2

The second method seems more complicated, so I would prefer to keep things simpler and use the first method, if it’s a legitimate way of doing this. Looking forward to your input. Thank you,

Rob

Hi @RJP! Option 1 will work! With Option 2 you would want to reset the server and the push the new app and tables using suitcase. When you reset the app server it completely replaces the data and the app on the server. To avoid someone accidentally deleting/resetting the server, do NOT give regular users/fieldworkers the level of access permissions for their login that would let them reset the server. See: Data Permission Filters — ODK-X Docs for the different permissions.

Happy to hear that Option 1 will suffice! I’ll look more deeply into setting permission levels for field crew members. Thanks a ton!

1 Like