mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 18:49:17 -07:00
backup restoration 90% completed
This commit is contained in:
parent
1155e9065e
commit
65db51189c
16 changed files with 330 additions and 99 deletions
41
web/bulk/restore/index.php
Normal file
41
web/bulk/restore/index.php
Normal file
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
ob_start();
|
||||
session_start();
|
||||
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
$action = $_POST['action'];
|
||||
$backup = escapeshellarg($_POST['backup']);
|
||||
|
||||
$web = 'no';
|
||||
$dns = 'no';
|
||||
$mail = 'no';
|
||||
$db = 'no';
|
||||
$cron = 'no';
|
||||
$udir = 'no';
|
||||
|
||||
if (!empty($_POST['web'])) $web = escapeshellarg(implode(",",$_POST['web']));
|
||||
if (!empty($_POST['dns'])) $dns = escapeshellarg(implode(",",$_POST['dns']));
|
||||
if (!empty($_POST['mail'])) $mail = escapeshellarg(implode(",",$_POST['mail']));
|
||||
if (!empty($_POST['db'])) $db = escapeshellarg(implode(",",$_POST['db']));
|
||||
if (!empty($_POST['cron'])) $cron = 'yes';
|
||||
if (!empty($_POST['udir'])) $udir = escapeshellarg(implode(",",$_POST['udir']));
|
||||
|
||||
if ($action == 'restore') {
|
||||
exec (VESTA_CMD."v-schedule-user-restore ".$user." ".$backup." ".$web." ".$dns." ".$mail." ".$db." ".$cron." ".$udir, $output, $return_var);
|
||||
if ($return_var == 0) {
|
||||
$_SESSION['restore_msg'] = _('RESTORE_SCHEDULED');
|
||||
} else {
|
||||
$_SESSION['restore_msg'] = implode('<br>', $output);
|
||||
if (empty($_SESSION['restore_msg'])) {
|
||||
$_SESSION['restore_msg'] = _('Error: vesta did not return any output.');
|
||||
}
|
||||
if ($return_var == 4) {
|
||||
$_SESSION['restore_msg'] = _('RESTORE_EXISTS');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
header("Location: /list/backup/?backup=" . $_POST['backup']);
|
Loading…
Add table
Add a link
Reference in a new issue