summaryrefslogtreecommitdiffstats
path: root/etc/rc.restore_full_backup
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@gmail.com>2011-09-25 20:27:28 -0400
committerScott Ullrich <sullrich@gmail.com>2011-09-25 20:27:28 -0400
commitb8bfcce55022da7095df386aee635d9f8fe24aa6 (patch)
tree815e42774e126d52e45c0d8b1841013c80b064a8 /etc/rc.restore_full_backup
parente40d415ab308d7b718c874c130bc7392122e1d56 (diff)
downloadpfsense-b8bfcce55022da7095df386aee635d9f8fe24aa6.zip
pfsense-b8bfcce55022da7095df386aee635d9f8fe24aa6.tar.gz
Add option to not restore config.xml
Diffstat (limited to 'etc/rc.restore_full_backup')
-rwxr-xr-xetc/rc.restore_full_backup8
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/rc.restore_full_backup b/etc/rc.restore_full_backup
index 9e3d6ce..05bb060 100755
--- a/etc/rc.restore_full_backup
+++ b/etc/rc.restore_full_backup
@@ -4,7 +4,13 @@ echo -n "Checking..."
if [ `tar tzPf $1 /etc/rc 2>/dev/null` ]; then
echo " Backup file looks OK."
echo "One moment, restoring ${1}..."
- tar xzPfU $1 -C / 2>/var/etc/restore_log.txt
+ if [ -f /tmp/do_not_restore_config.xml ]; then
+ EXCLUDE="--exclude /cf/conf/config.xml"
+ rm /tmp/do_not_restore_config.xml
+ else
+ EXCLUDE=""
+ fi
+ tar xzPfU $1 $EXCLUDE -C / 2>/var/etc/restore_log.txt
echo "Restore of $1 complete."
else
echo " Error."
OpenPOWER on IntegriCloud