pfSense Backup

1. Script for DDNS

Create the following script with name /root/backup.sh and make it executable with chmod +x /root/backup.sh. Replace the ? in the last scp command with the right IP Address

#!/bin/sh
DATE=`date +%Y.%m.%d`
scp /cf/conf/config.xml "tanshu@hopsngrains.com:Data/10.?.0.x/pfsense-10.?.0.1-$DATE.xml"

2. Schedule the script

Edit crontab using crontab -e. Swith to insert mode by pressing i. Paste the following command 0 13 * * * /root/backup.sh. Go back to command mode with esc. Save using :wq

3. Server preperation

mkdir -p ~/Data/10.?.0.x/