Point automatic backup to NAS?
Moderators: leecollings, remb0
-
- Posts: 749
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Point automatic backup to NAS?
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?
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?
Hans
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Point automatic backup to NAS?
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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- zenit
- Posts: 17
- Joined: Wednesday 25 March 2015 17:40
- Target OS: Linux
- Domoticz version: Beta
- Location: Berg aan de Maas
- Contact:
Re: Point automatic backup to NAS?
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).
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).
-
- Posts: 749
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Point automatic backup to NAS?
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.zenit wrote: ↑Tuesday 05 March 2019 6:37 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).
Hans
-
- Posts: 749
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Point automatic backup to NAS?
Looks like this is what I need. Hmmm... SymLink. Learning every day.

Hans
-
- Posts: 749
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Point automatic backup to NAS?
Implemented, and works like a charm. This is exactly what I was looking for!manjh wrote: ↑Sunday 10 March 2019 18:20Looks like this is what I need. Hmmm... SymLink. Learning every day.![]()
Hans
-
- Posts: 28
- Joined: Friday 04 January 2019 18:22
- Target OS: Linux
- Domoticz version: GIT
- Contact:
Re: Point automatic backup to NAS?
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?)
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Point automatic backup to NAS?
The path is hardcoded.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?)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 28
- Joined: Friday 04 January 2019 18:22
- Target OS: Linux
- Domoticz version: GIT
- Contact:
Re: Point automatic backup to NAS?
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.
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.
Who is online
Users browsing this forum: No registered users and 1 guest