Page 1 of 1
Point automatic backup to NAS?
Posted: Tuesday 26 February 2019 21:49
by manjh
I'm sure this must have been discussed before, but I can't find it.
The automatic backup feature in Domoticz will create backups on hourly, daily and monthly level on the SD card of the R-Pi. I have seen several solutions to copy this onto a NAS periodically, but I would much rather write these backups straight to a mounted NAS.
Where can I change the write path of Domoticz?
Re: Point automatic backup to NAS?
Posted: Monday 04 March 2019 21:04
by manjh
No ideas, anyone? I can't believe this is "impossible"...

Re: Point automatic backup to NAS?
Posted: Monday 04 March 2019 21:53
by waaren
manjh wrote: ↑Monday 04 March 2019 21:04
No ideas, anyone? I can't believe this is "impossible"...
One idea is to mount a NAS directory on your system and create a symbolic link from the domoticz/backups directory.
Another idea is to use berryboot or something similar to only bootstrap from your SD and route all IO to/from NAS.
Re: Point automatic backup to NAS?
Posted: Tuesday 05 March 2019 6:37
by zenit
Hi,
Maybe you could check the wiki...
https://www.domoticz.com/wiki/Daily_bac ... ternal_hdd
There are examples of backing up your database and folders (scripts).
Re: Point automatic backup to NAS?
Posted: Sunday 10 March 2019 18:06
by manjh
Yes, I did see that, but I don't want the backups to be written on SD in the first place. All of these examples simply copy the files from SD to NAS.
Re: Point automatic backup to NAS?
Posted: Sunday 10 March 2019 18:20
by manjh
waaren wrote: ↑Monday 04 March 2019 21:53
manjh wrote: ↑Monday 04 March 2019 21:04
No ideas, anyone? I can't believe this is "impossible"...
One idea is to mount a NAS directory on your system and create a symbolic link from the domoticz/backups directory.
Another idea is to use berryboot or something similar to only bootstrap from your SD and route all IO to/from NAS.
Looks like this is what I need. Hmmm... SymLink. Learning every day.

Re: Point automatic backup to NAS?
Posted: Monday 11 March 2019 0:59
by manjh
manjh wrote: ↑Sunday 10 March 2019 18:20
waaren wrote: ↑Monday 04 March 2019 21:53
manjh wrote: ↑Monday 04 March 2019 21:04
No ideas, anyone? I can't believe this is "impossible"...
One idea is to mount a NAS directory on your system and create a symbolic link from the domoticz/backups directory.
Another idea is to use berryboot or something similar to only bootstrap from your SD and route all IO to/from NAS.
Looks like this is what I need. Hmmm... SymLink. Learning every day.
Implemented, and works like a charm. This is exactly what I was looking for!
Re: Point automatic backup to NAS?
Posted: Wednesday 13 March 2019 18:30
by Segfault
Is there a variable somewhere or this path ~/backups is hardcoded and requires patching and recompiling? (This was the question of the OP, no answer so far?)
Re: Point automatic backup to NAS?
Posted: Wednesday 13 March 2019 18:39
by waaren
Segfault wrote:Is there a variable somewhere or this path ~/backups is hardcoded and requires patching and recompiling? (This was the question of the OP, no answer so far?)
The path is hardcoded.
Re: Point automatic backup to NAS?
Posted: Wednesday 13 March 2019 20:17
by Segfault
Thanks for reply.
Now comes another issue. Why is the database owned by root (running RPi installation)? There is no real reason domoticz should run as root, it is against all good Unix principles. For instance, I'd like to put the whole /home/domoticz into a NFS share, I have several users with home on NFS. And of course, I can't, because root has no business making remote connections and remote root ownership cannot be accepted by NFS server for security reasons. The server runs RAIDZ-2 array and there are backup policies in place. Using NFS home would resolve all my backup problems and would reduce writes on USB stick.