summaryrefslogtreecommitdiffstats
path: root/etc/rc.create_full_backup
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-02-14 14:37:17 -0500
committerScott Ullrich <sullrich@pfsense.org>2010-02-14 14:37:17 -0500
commit39ab66a1a1b73ce174b920136d051c23d2dce165 (patch)
tree965b65307e1812b03eda4366fdb2ae3fb10e73b0 /etc/rc.create_full_backup
parente5977136bb173ab2c03ed4cdbc692ba0cb1996b0 (diff)
downloadpfsense-39ab66a1a1b73ce174b920136d051c23d2dce165.zip
pfsense-39ab66a1a1b73ce174b920136d051c23d2dce165.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.
Diffstat (limited to 'etc/rc.create_full_backup')
-rw-r--r--etc/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 100644
index 0000000..e2af12d
--- /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/* /
+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