Add option to not restore config.xml
This commit is contained in:
parent
e40d415ab3
commit
b8bfcce550
|
@ -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."
|
||||
|
|
|
@ -55,6 +55,9 @@ require_once("functions.inc");
|
|||
require_once("filter.inc");
|
||||
require_once("shaper.inc");
|
||||
|
||||
if($_POST['overwriteconfigxml'])
|
||||
touch("/tmp/do_not_restore_config.xml");
|
||||
|
||||
if ($_POST['restorefile']) {
|
||||
$filename = $_POST['restorefile'];
|
||||
if(file_exists("/root/{$filename}")) {
|
||||
|
@ -124,6 +127,9 @@ include("head.inc");
|
|||
?>
|
||||
<tr>
|
||||
<td width="78%" class="vtable" colspan="2">
|
||||
<br/>
|
||||
<input type="checkbox" name="overwriteconfigxml" id="overwriteconfigxml" CHECKED> do not restore config.xml.
|
||||
<p/>
|
||||
<input name="Restore" type="submit" class="formbtn" id="restore" value="<?=gettext("Restore"); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Reference in New Issue