adridoesthings / Opnsense config backup script

0 likes
0 forks
1 files
Last active 6 months ago
An opnsense config backup script which gzip's the config file and encrypts it with gpg. Just change the first variables to your configuration specific. Then you can run this script with cronjob for example.
1 #!/bin/bash
2 set -eeuo pipefail
3
4 # your configuration constants
5 # generate key and secret on /ui/auth/user
6 OPNSENSE_URL="https://opnsense.yournetwork.lan"
7 OPNSENSE_KEY=""
8 OPNSENSE_SECRET=""
9 GPG_RECIPIENT=""
10 BACKUP_DESTINATION="./backups"
Newer Older