odk

ODK briefcase command-line form export


I am trying to automaticly backup forms submited to transform them to CSV.

I am using this commandline:

 java -jar ./ODK_Briefcase_v1.4.5_Production.jar --form_id NameOfTheForm 
--odk_username USER --odk_password PASSWORD 
--export_directory /var/www/data --storage_directory /var/www/data 
--export_filename A_Chaufferie.csv --overwrite_csv_export 
--export_start_date 2014/02/05 --export_end_date 2016/02/06

I get the error GRAVE: Form not found

I have no idea what is the purpose of storage_directory. I can't find any forms submissions on mys server (tryed with the linux command find).

Do you know what I am missing?


i have this --help:

java -jar briefcase.jar
 -ed,--export_directory </path/to/dir>     Directory to export the CSV and
                                           media files into (relative path
                                           unless it begins with / or C:\)
 -em,--exclude_media_export                Flag to exclude media on export
 -end,--export_end_date <yyyy/MM/dd>       Include submission dates before
                                           (exclusive) this date in export
                                           to CSV
 -f,--export_filename <name.csv>           File name for exported CSV
 -h,--help                                 Print help information (this
                                           screen)
 -id,--form_id <form_id>                   Form ID of form to download and
                                           export
 -oc,--overwrite_csv_export                Flag to overwrite CSV on export
 -od,--odk_directory </path/to/dir>        /odk directory from ODK Collect
                                           (relative path unless it begins
                                           with / or C:\)
 -p,--odk_password <password>              ODK password
 -pf,--pem_file </path/to/file.pem>        PEM private key file (relative
                                           path unless it begins with / or
                                           C:\)
 -sd,--storage_directory </path/to/dir>    Directory to create or find ODK
                                           Briefcase Storage directory
                                           (relative path unless it begins
                                           with / or C:\)
 -start,--export_start_date <yyyy/MM/dd>   Include submission dates after
                                           (inclusive) this date in export
                                           to CSV
 -u,--odk_username <username>              ODK username
 -url,--aggregate_url <url>                ODK Aggregate URL (must start
                                           with http:// or https://)
 -v,--version                              Print version information

Solution

  • I didn't know i had to put --aggregate_url even if the brieface and ODK aggregate are in the same server. Don't miss the http:// or it won't work

    java -jar ./ODK_Briefcase_v1.4.5_Production.jar --form_id NameOfTheForm 
    --odk_username USER --odk_password PASSWORD 
    --export_directory /var/www/data --storage_directory /var/www/briefcase
    --export_filename A_Chaufferie.csv --overwrite_csv_export 
    --export_start_date 2014/02/05 --export_end_date 2016/02/06
    --aggregate_url http://your.odk-aggregate.site