The weewx service saves the met-station data into its own SQLite database.
We want a daily backup of this data to be saved onto an attached USB drive in csv format so that field staff can simply replace the USB drive to 'download' data from eh station.
To dump SQLite as csv:
sqlite3 /var/lib/weewx/weewx.sdb.headers on.mode csv.output filename.csvselect * from archive;exit
This should be run as a cron job at 00:10 each day to backup the previous days data. Then copy the generated file to the mounted USB drive.
The weewx service saves the met-station data into its own SQLite database.
We want a daily backup of this data to be saved onto an attached USB drive in csv format so that field staff can simply replace the USB drive to 'download' data from eh station.
To dump SQLite as csv:
sqlite3 /var/lib/weewx/weewx.sdb
.headers on
.mode csv
.output filename.csv
select * from archive;
exit
This should be run as a cron job at 00:10 each day to backup the previous days data. Then copy the generated file to the mounted USB drive.