I have been trying to follow the wiki which explains how to backup the DB using FTP.
This is what it says (I trimmed the stuff which is not relevant) :
Now.. maybe I am crazy here, but if I stop the domoticz service how can I then call the backupdatabase.php?Script to backup to FTP-server (only Domoticz database)
The script below will save a copy of your 'domoticz.db' (database) to the folder specified.
However, you probably also use some scripts that you want to backup too, so you probably want the script further down this page.
### Stop Domoticz, create backup, ZIP it and start Domoticz again
service domoticz.sh stop
/usr/bin/curl -s http://$DOMO_IP:$DOMO_PORT/backupdatabase.php > /tmp/$BACKUPFILE
service domoticz.sh start
Addition: If this doesn't work, try to outcomment the "service domoticz.sh stop" and "service domoticz.sh start" by adding a '#' in front (so for example"#service domoticz.sh stop"). It seems that domoticz on a Raspberry sometimes does not stop soon enough, which will result in an empty database file.
For me, this logic is totally wrong - this will only work if the stop command is disabled.
After stopping the service, we should gzip Domoticz.db file direct from the filesystem.. no?