Page 1 of 1
Backup Domoticz
Posted: Saturday 25 April 2020 23:24
by Mrtn83
Hello,
I have created a script with the wiki (
https://www.domoticz.com/wiki/Daily_ba ... ternal_hdd ) to backup the database and the scripts to my NAS. It al works great besides the fact that the database file only contains the message unauthorized. If I FTP to the domoticz backup folder access is denied aswel. What am I doing wrong?
Re: Backup Domoticz
Posted: Sunday 26 April 2020 9:41
by jvdz
Are you using an Userid/Password for 127.0.0.1 or LAN ip addresses?
In that case you need to include the userid:password in the url:
Code: Select all
/usr/bin/curl -s http://$userid:$password@$DOMO_IP:$DOMO_PORT/backupdatabase.php > /tmp/$BACKUPFILE
Jos
Re: Backup Domoticz
Posted: Monday 27 April 2020 22:25
by Mrtn83
I used what was in the wiki:
/usr/bin/curl -s http://$DOMO_IP:$DOMO_PORT/backupdatabase.php > /tmp/$BACKUPFILE
Re: Backup Domoticz
Posted: Monday 27 April 2020 22:45
by jvdz
understood, but the question was whether you are using security in Domoticz for the IP address you have specified in the batch file?
When that is the case you need to change that line as indicated or when you run it on the same server you could use 127.0.0.1 for DOMO_IP and add that to the networks in system setup: "Local Networks (no username/password):"
Jos
Re: Backup Domoticz
Posted: Monday 15 June 2020 8:54
by Mrtn83
Took me while to get back on to this subject. But you're suggestion fixed the problem.
Thanks!