summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-02-14 14:47:45 -0500
committerScott Ullrich <sullrich@pfsense.org>2010-02-14 14:47:45 -0500
commitda4cd20b908eb7b60e5e58f72fb151fde2b45059 (patch)
tree22f726fc35a3998eb663269157a2e6a68f4cf9ae
parent81ff3addf52444a14d25c7c6b92a321bba718da2 (diff)
downloadpfsense-da4cd20b908eb7b60e5e58f72fb151fde2b45059.zip
pfsense-da4cd20b908eb7b60e5e58f72fb151fde2b45059.tar.gz
Adding backup script that can be run before upgrading which backs up everything including config.xml. Script gives instructions on how to restore a specific file as well.
-rwxr-xr-xetc/rc.create_full_backup8
1 files changed, 8 insertions, 0 deletions
diff --git a/etc/rc.create_full_backup b/etc/rc.create_full_backup
new file mode 100755
index 0000000..e0648df
--- /dev/null
+++ b/etc/rc.create_full_backup
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+FILENAME="pfSense-full-backup-`date "+%Y%m%d-%H%M"`.tgz"
+echo ">>> Creating full backup to $FILENAME"
+tar czPf /root/$FILENAME --exclude dev/* --exclude tmp/* --exclude var/db --exclude var/run/* --exclude root/* /
+echo ">>> Backup completed. Note: this backup includes config.xml!"
+echo ">>> To restore this backup run this command:"
+echo " tar xzPf /root/$FILENAME -C /"
OpenPOWER on IntegriCloud