Regular data backup from Loxone Miniserver to Synology NAS
I just found very nice post about how to backup data through FTP to Synology. It is well applicable for Loxone as well, so if you are interested, you can find it here.
I don't want to steal anyone else's ideas, but just for case the original posts dissapears, here is the custom two line script doing the trick. In the task scheduler (Control Panel / Task Scheduler) you create regular task with the following user-defined script pasted in the Run Command box:
wget -m ftp://<username>:<password>@<server_ip>/* -P /volume1/SecureBackups tar -zcvf /volume1/SecureBackups/backup-$(date +%Y-%m-%d-%H-%M-%S).tar.gz /volume1/SecureBackups/<server_ip>/
What it does is that wget command mirrors the content of the FTP site (see documentation to wget here for more details) and stores these data to the directory listed after the -P parameter (locally at Synology storage). The beauty of this command is that with the next runs it only re-downloads the differences, so you don't need to transfer all the data over and over.
Then the next line creates compressed package of the whole structure downloaded, with date stamped filename. In my case, these are around 30MB for the whole miniserver structure compressed.
Please note that FTP is very old internet protocol and transfers plain username and password over the network. You should use this only on your local network, otherwise you're at risk of attacking your system by someone stealing these credentials. Also, your credentials are visible in the script in the Synology task details so please consider these factors when applying this solution.
However, this provides nice and simple solution how to schedule regular backup of the data from Loxone Miniserver to your local storage. Thanks a lot to Evotec for the idea.