Personal tools

Backup

From PhotoVoltaic Logger new generation

Revision as of 13:25, 27 February 2014 by KKoPV (talk | contribs) (Created page with "== Database backup == A full database backup is quite simple. $ mysqldump -u [username] -p[password] -h [host] [databaseName] >PVLng-$(date +"Y-m-d").sql It just dumps all...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Database backup

A full database backup is quite simple.

$ mysqldump -u [username] -p[password] -h [host] [databaseName] >PVLng-$(date +"Y-m-d").sql

It just dumps all data into a date stamped SQL file.

Backup with API

If you are interested in CSV/TSV data as backup, you can do this by requesting all data for a channel via the API

$ GUID=your_GUID_here
$ wget -o PVLng-$GUID-$(date +"Y-m-d").csv http://your.domain.here/api/r3/data/$GUID.csv?start=0&full=1
  • start=0 - all data since 1970...
  • full=1 - extract also the readable date+time column