Hi
I'm using a shell script:
Works for me even for 25.1.1 and all previous firmware versions.
Hope that helps!
bb
I'm using a shell script:
Code Select
#!/bin/bash
OPNKEY="<api-key>"
OPNSECRET="<api-secret>"
OPNHOST="<opnsense-host-ip-dns>"
DEST="/mnt/backup/opnsense/"
MDATE=$(date +%Y%m%d-%H%M%S)
if test -d $DEST; then
curl -s -k -u $OPNKEY:$OPNSECRET https://$OPNHOST:8443/api/backup/backup/download \
-o $DEST/config-$OPNHOST-$MDATE.xml
cd $DEST
tar -czf config-$OPNHOST-$MDATE.xml.tar.gz config-$OPNHOST-$MDATE.xml
rm config-$OPNHOST-$MDATE.xml
find $DEST/ -type f -name '*.xml' -mtime +360 -exec rm {} \;
fi
Works for me even for 25.1.1 and all previous firmware versions.
Hope that helps!
bb