I haven't used this util in a couple of years and it does work with OPNsense..https://github.com/KoenZomers/pfSenseBackup
What brandof NAS are you using? I‘m running a git server on my Synology, and using that as backup. There‘s an official Synology package for that (I‘m using a different one but it shouldn‘t matter).
scp root@192.168.1.1:/conf/config.xml .
scp root@192.168.1.1:/conf/config.xml /opt/backups/opnsense_config_$(date).xml
0 1 * * * scp root@192.168.1.1:/conf/config.xml ~/config_$(date +"%Y%m%d").xml >/dev/null 2>&1
This one logs in via ssh and copies config.xml to the current directory (.). Just put some datetime variable into there, use ssh keys, and put that line into a cronjob and you are essentially done.
If your NAS system is configured to send email, then failing cron jobs should generate a mail with the error message.
I’m also surprised, as I assumed backup destinations in general (and especially cloud-based ones) are passive and just store data.
You could even use the API of the opnsense to pull a backup, which would be more secure than SCP since you do not need elevated rights. […] In german but just as reference:https://andersgood.de/kurz-notiert/opnsense-per-api-verschluesseltes-backup-der-konfiguration-anlegen
Pulling via SSH gives you a "no additional infrastructure necessary" way to achieve the same. And my impression was that was your primary concern.
Quote from: Monviech on September 30, 2024, 11:48:45 amYou could even use the API of the opnsense to pull a backup, which would be more secure than SCP since you do not need elevated rights. […] In german but just as reference:https://andersgood.de/kurz-notiert/opnsense-per-api-verschluesseltes-backup-der-konfiguration-anlegenOh yes, that's very helpful, thanks. The page you linked mentions monit, so I will look into that too.