i run various versions of domoticz, and it seems every version has a different database format.
there is a database version in the domoticz database table preferences, but i did not want to open every database
to inspect the version number.
so i wrote attached program extract-dz-db-version to return the version number of the database.
you could use it like this.
Code: Select all
#!/bin/bash
#
# purpose: show usage of extract-dz-db-version
#
#
# Version Date Reason
# 0.0.1 2020-04-05 initial release
STRING="$( ./extract-dz-db-version /home/pi/domoticz/domoticz.db)"
echo Domoticz Database version is $STRING
# example usage
# /usr/bin/curl -s http://127.0.0.1:8080/backupdatabase.php >/path/to/domoticz.db.$STRING