Backup Domoticz

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Mrtn83
Posts: 11
Joined: Friday 25 October 2019 22:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Vlaardingen
Contact:

Backup Domoticz

Post 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?
User avatar
jvdz
Posts: 2334
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Backup Domoticz

Post 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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Mrtn83
Posts: 11
Joined: Friday 25 October 2019 22:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Vlaardingen
Contact:

Re: Backup Domoticz

Post by Mrtn83 »

I used what was in the wiki:

/usr/bin/curl -s http://$DOMO_IP:$DOMO_PORT/backupdatabase.php > /tmp/$BACKUPFILE
User avatar
jvdz
Posts: 2334
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Backup Domoticz

Post 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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Mrtn83
Posts: 11
Joined: Friday 25 October 2019 22:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Vlaardingen
Contact:

Re: Backup Domoticz

Post by Mrtn83 »

Took me while to get back on to this subject. But you're suggestion fixed the problem.
Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest