#!/bin/sh

FILENAME="pfSense-full-backup-`date "+%Y%m%d-%H%M"`.tgz"
echo ">>> Creating full backup to /root/$FILENAME"
tar czPf /root/$FILENAME \
	--exclude dev/* \
	--exclude tmp/* \
	--exclude var/db \
	--exclude var/run/* \
	--exclude root/* \
	--exclude var/empty/* \
	--exclude var/empty \
	--exclude var/etc \
	/

echo ">>> Backup completed.  Note: this backup includes config.xml!"
echo ">>> To restore this backup run this command:"
echo "    /etc/rc.restore_full_backup /root/$FILENAME"
