Based upon this script but updated to backup a highly available pair of firewalls from a remote backup server.
Also uses pigz in place of gz to parallelize (and rapidly speed up) compression (and if you're keeping more than a couple of days worth, you'll want to compress these).
Keeps 30 days of backups by default. Assumes that Cron runs daily. Adjust the KEEP_DAYS
variable if necessary.
- pfSense, obviously
- a dedicated Backup user, with
WebCfg - Diagnostics: Backup & Restore
permission - a remote server to run this script from
- proper values for
PFSENSE_HOST1
,PFSENSE_HOST2
,PFSENSE_USER
,PFSENSE_PASS
,BACKUP_DIR
, etc.