1 |
39ab66a1
|
Scott Ullrich
|
#!/bin/sh
|
2 |
|
|
|
3 |
|
|
FILENAME="pfSense-full-backup-`date "+%Y%m%d-%H%M"`.tgz"
|
4 |
495df644
|
Scott Ullrich
|
echo ">>> Creating full backup to /root/$FILENAME"
|
5 |
bb5e7a61
|
Scott Ullrich
|
tar czPf /root/$FILENAME \
|
6 |
|
|
--exclude dev/* \
|
7 |
16b96ea6
|
Scott Ullrich
|
--exclude tmp/* \
|
8 |
|
|
--exclude var/db \
|
9 |
|
|
--exclude var/run/* \
|
10 |
|
|
--exclude root/* \
|
11 |
4870ddca
|
Scott Ullrich
|
--exclude var/empty/* \
|
12 |
fc116e4a
|
Scott Ullrich
|
--exclude var/empty \
|
13 |
277d55d7
|
Scott Ullrich
|
--exclude var/etc \
|
14 |
16b96ea6
|
Scott Ullrich
|
/
|
15 |
2b0c49e3
|
Scott Ullrich
|
|
16 |
39ab66a1
|
Scott Ullrich
|
echo ">>> Backup completed. Note: this backup includes config.xml!"
|
17 |
|
|
echo ">>> To restore this backup run this command:"
|
18 |
807c2e7a
|
Scott Ullrich
|
echo " /etc/rc.restore_full_backup /root/$FILENAME"
|