diff --git a/etc/rc.firmware b/etc/rc.firmware
index 698db67ce6..1fb9f65263 100755
--- a/etc/rc.firmware
+++ b/etc/rc.firmware
@@ -398,6 +398,12 @@ pfSenseupgrade)
touch /var/run/firmwarelock.dirty
+ if [ -f /tmp/perform_full_backup.txt ]; then
+ echo "Performing full backup" >> /conf/upgrade_log.txt
+ /etc/rc.create_full_backup
+ rm /tmp/perform_full_backup.txt
+ fi
+
touch /conf/upgrade_log.txt
echo "" >> /conf/upgrade_log.txt
diff --git a/usr/local/www/system_firmware.php b/usr/local/www/system_firmware.php
index 9e876c9525..ceafcecffa 100755
--- a/usr/local/www/system_firmware.php
+++ b/usr/local/www/system_firmware.php
@@ -111,6 +111,9 @@ if(is_subsystem_dirty('firmwarelock')) {
exit;
}
+if($_POST['backupbeforeupgrade'])
+ touch("/tmp/perform_full_backup.txt");
+
if($_POST['kerneltype']) {
if($_POST['kerneltype'] == "single")
system("touch /boot/kernel/pfsense_kernel.txt");
@@ -289,6 +292,8 @@ if(stristr($_FILES['ulfile']['name'],"nanobsd"))
*/
?>
+ =gettext("Perform full backup prior to upgrade");?>
+
">
=gettext("You must reboot the system before you can upgrade the firmware.");?>