|
|
@@ -1,8 +1,14 @@
|
|
|
<?php
|
|
|
|
|
|
$msg = "";
|
|
|
-if ( ($_SERVER["REQUEST_METHOD"] == "POST") && ( isset($_POST["disks"]) ) ){
|
|
|
- $msg = "Scheduled incremental Backup for disk(s): ";
|
|
|
+if ( ($_SERVER["REQUEST_METHOD"] == "POST") && ( isset($_POST["disks"]) ) && ( isset($_POST["backup"]) ) ){
|
|
|
+ $type = "";
|
|
|
+ if ($_POST["backup"] == "differential backup"){
|
|
|
+ $type = "Differential";
|
|
|
+ } else {
|
|
|
+ $type = "Incremental";
|
|
|
+ }
|
|
|
+ $msg = "Scheduled ".$type." Backup for disk(s): ";
|
|
|
$pipe = popen('bconsole -c /var/www/bconsole.conf 2>&1 > /tmp/feedback', 'w');
|
|
|
#2017-06-02 15:02:43
|
|
|
$date = date('Y-m-d G:i:s', time()+60);
|
|
|
@@ -10,7 +16,7 @@ if ( ($_SERVER["REQUEST_METHOD"] == "POST") && ( isset($_POST["disks"]) ) ){
|
|
|
foreach ($_POST["disks"] as $backup) {
|
|
|
if ( preg_match("/hdd\d+/", $backup) ){
|
|
|
$msg .= "$backup, ";
|
|
|
- $cmd = "run job=\"Backup_archivo_to_LTO7\" fileset=\"archivo $backup\" level=\"Incremental\" client=\"archivo-fd\" pool=\"Incremental\" storage=\"LTO7\" priority=10 when=\"$date\" yes\n\r";
|
|
|
+ $cmd = "run job=\"Backup_archivo_to_LTO7\" fileset=\"archivo $backup\" level=\"".$type."\" client=\"archivo-fd\" pool=\"".$type."\" storage=\"LTO7\" priority=10 when=\"$date\" yes\n\r";
|
|
|
fwrite($pipe, $cmd, strlen($cmd));
|
|
|
#$msg .= $cmd;
|
|
|
}
|
|
|
@@ -69,13 +75,13 @@ if ( isset($msg) ) {
|
|
|
print "<div>$msg</div>";
|
|
|
}
|
|
|
?>
|
|
|
-<h1>incremental Backup</h1>
|
|
|
+ <h1>Backup</h1>
|
|
|
<form action="backup.php" method="post">
|
|
|
<input type="hidden" name="type" value="incremental">
|
|
|
<div class="left">
|
|
|
<select id="selectbox" name="disks[]" multiple>
|
|
|
<?php
|
|
|
- for ($i=1;$i<=20;$i++){
|
|
|
+ for ($i=1;$i<=40;$i++){
|
|
|
$disk = sprintf("hdd%02d", $i);
|
|
|
echo "<option value=\"$disk\">$disk</option>";
|
|
|
}
|
|
|
@@ -85,7 +91,8 @@ if ( isset($msg) ) {
|
|
|
<div class="right">
|
|
|
<input type="button" name="Button" value="alle auswählen" onclick="selectAll('selectbox',true)" />
|
|
|
<input type="button" name="Button" value="keine auswählen" onclick="selectAll('selectbox',false)" />
|
|
|
- <input type="submit" value="backup">
|
|
|
+ <input type="submit" name="backup" value="incremental backup">
|
|
|
+ <input type="submit" name="backup" value="differential backup">
|
|
|
<div/>
|
|
|
</form>
|
|
|
<div class="2row">
|