summaryrefslogtreecommitdiffstats
path: root/usr/local/www/diag_nanobsd.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-08-09 16:12:52 -0400
committerjim-p <jimp@pfsense.org>2010-08-09 16:14:29 -0400
commit85405c11a0ab41d26e5016b055b2f1188317c8f2 (patch)
tree068661bb6c8342a91ea4730fc04a9c532eb9e3db /usr/local/www/diag_nanobsd.php
parent0c77c314c441b9f1a9967a9bdc0ee6ad0a8fc90b (diff)
downloadpfsense-85405c11a0ab41d26e5016b055b2f1188317c8f2.zip
pfsense-85405c11a0ab41d26e5016b055b2f1188317c8f2.tar.gz
Add the ability to set a periodic RRD and DHCP leases backup from Diagnostics > NanoBSD.
Diffstat (limited to 'usr/local/www/diag_nanobsd.php')
-rwxr-xr-xusr/local/www/diag_nanobsd.php53
1 files changed, 53 insertions, 0 deletions
diff --git a/usr/local/www/diag_nanobsd.php b/usr/local/www/diag_nanobsd.php
index db96484..2ddcf9e 100755
--- a/usr/local/www/diag_nanobsd.php
+++ b/usr/local/www/diag_nanobsd.php
@@ -100,6 +100,16 @@ EOF;
nanobsd_detect_slice_info();
}
+if (isset($_POST['rrdbackup'])) {
+ $config['system']['rrdbackup'] = $_POST['rrdbackup'];
+ install_cron_job("/etc/rc.backup_rrd.sh", ($config['system']['rrdbackup'] > 0), $minute="0", "*/{$config['system']['rrdbackup']}");
+}
+if (isset($_POST['dhcpbackup'])) {
+ $config['system']['dhcpbackup'] = $_POST['dhcpbackup'];
+ install_cron_job("/etc/rc.backup_dhcpleases.sh", ($config['system']['dhcpbackup'] > 0), $minute="0", "*/{$config['system']['dhcpbackup']}");
+}
+
+
if ($savemsg)
print_info_box($savemsg)
@@ -165,6 +175,49 @@ if ($savemsg)
<tr>
<td valign="top" class="">&nbsp;</td><td><br/><input type='submit' value='Duplicate slice'></form></td>
</tr>
+ <tr>
+ <td colspan="2" valign="top" class="">&nbsp;</td>
+ </tr>
+ <tr>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Periodic Data Backup");?></td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("RRD Backup");?></td>
+ <td width="78%" class="vtable">
+ <form action="diag_nanobsd.php" method="post" name="iform">
+ <?=gettext("Frequency");?>:
+ <select name='rrdbackup'>
+ <option value='0' <? if (!isset($config['system']['rrdbackup']) || ($config['system']['rrdbackup'] == 0)) echo "selected"; ?>>Disable</option>
+ <? for ($x=1; $x<=24; $x++) { ?>
+ <option value='<?= $x ?>' <? if ($config['system']['rrdbackup'] == $x) echo "selected"; ?>><?= $x ?> hour<? if ($x>1) echo "s"; ?></option>
+ <? } ?>
+ </select>
+ <br/>
+ <?=gettext("This will peridoically backup the RRD data so it can be restored automatically on the next boot. Keep in mind that the more frequent the backup, the more writes will happen to your media.");?>
+ <br/>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("DHCP Leases Backup");?></td>
+ <td width="78%" class="vtable">
+ <form action="diag_nanobsd.php" method="post" name="iform">
+ <?=gettext("Frequency");?>:
+ <select name='dhcpbackup'>
+ <option value='0' <? if (!isset($config['system']['dhcpbackup']) || ($config['system']['dhcpbackup'] == 0)) echo "selected"; ?>>Disable</option>
+ <? for ($x=1; $x<=24; $x++) { ?>
+ <option value='<?= $x ?>' <? if ($config['system']['dhcpbackup'] == $x) echo "selected"; ?>><?= $x ?> hour<? if ($x>1) echo "s"; ?></option>
+ <? } ?>
+ </select>
+ <br/>
+ <?=gettext("This will peridoically backup the DHCP leases data so it can be restored automatically on the next boot. Keep in mind that the more frequent the backup, the more writes will happen to your media.");?>
+ <br/>
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" class="">&nbsp;</td><td><br/><input type='submit' value='Save'></form></td>
+ </tr>
<?php if(file_exists("/conf/upgrade_log.txt")): ?>
<tr>
<td colspan="2" valign="top" class="">&nbsp;</td>
OpenPOWER on IntegriCloud