mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-19 21:04:06 -07:00
backup restoration 90% completed
This commit is contained in:
parent
1155e9065e
commit
65db51189c
16 changed files with 330 additions and 99 deletions
|
@ -402,7 +402,7 @@ then
|
||||||
cron_record=$(wc -l $USER_DATA/cron.conf|cut -f 1 -d ' ')
|
cron_record=$(wc -l $USER_DATA/cron.conf|cut -f 1 -d ' ')
|
||||||
|
|
||||||
if [ -e "/var/spool/cron/$user" ]; then
|
if [ -e "/var/spool/cron/$user" ]; then
|
||||||
cron_list='yes'
|
cron_list="$cron_record"
|
||||||
cp /var/spool/cron/$user $tmpdir/cron/
|
cp /var/spool/cron/$user $tmpdir/cron/
|
||||||
fi
|
fi
|
||||||
if [ "$cron_record" -eq 1 ]; then
|
if [ "$cron_record" -eq 1 ]; then
|
||||||
|
@ -417,22 +417,28 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# User Directories
|
# User Directories
|
||||||
echo "-- User Directories --"
|
echo "-- User Dir --"
|
||||||
msg="$msg\n-- User Directories --"
|
msg="$msg\n-- User Dir --"
|
||||||
mkdir $tmpdir/user_dirs
|
mkdir $tmpdir/user_dir
|
||||||
user_dirs=$(ls $HOMEDIR/$user | \
|
user_dir=$(ls $HOMEDIR/$user | \
|
||||||
grep -v conf | \
|
grep -v conf | \
|
||||||
grep -v web | \
|
grep -v web | \
|
||||||
grep -v dns | \
|
grep -v dns | \
|
||||||
grep -v mail | \
|
grep -v mail | \
|
||||||
grep -v tmp)
|
grep -v tmp)
|
||||||
i=0
|
i=0
|
||||||
for user_dir in $user_dirs; do
|
for udir in $user_dir; do
|
||||||
|
udir_list="$udir_list $udir"
|
||||||
((i ++))
|
((i ++))
|
||||||
echo -e "$(date "+%F %T") $user_dir"
|
echo -e "$(date "+%F %T") $udir"
|
||||||
msg="$msg\n$(date "+%F %T") $user_dir"
|
msg="$msg\n$(date "+%F %T") $udir"
|
||||||
cp -pr $HOMEDIR/$user/$user_dir $tmpdir/user_dirs/
|
cp -pr $HOMEDIR/$user/$udir $tmpdir/user_dir/
|
||||||
|
cd $tmpdir/user_dir/
|
||||||
|
tar -czpf $udir.tar.gz $udir
|
||||||
|
rm -rf $udir
|
||||||
done
|
done
|
||||||
|
udir_list=$(echo "$udir_list" | sed -e "s/ */\ /g" -e "s/^ //")
|
||||||
|
|
||||||
if [ "$i" -eq 1 ]; then
|
if [ "$i" -eq 1 ]; then
|
||||||
echo -e "$(date "+%F %T") $i user directory"
|
echo -e "$(date "+%F %T") $i user directory"
|
||||||
msg="$msg\n$(date "+%F %T") $i directory"
|
msg="$msg\n$(date "+%F %T") $i directory"
|
||||||
|
@ -508,7 +514,7 @@ local_backup(){
|
||||||
|
|
||||||
# Defining ftp command function
|
# Defining ftp command function
|
||||||
ftpc() {
|
ftpc() {
|
||||||
ftp -n $HOST $FTP_PORT <<EOF
|
ftp -n $HOST <<EOF
|
||||||
quote USER $USERNAME
|
quote USER $USERNAME
|
||||||
quote PASS $PASSWORD
|
quote PASS $PASSWORD
|
||||||
binary
|
binary
|
||||||
|
@ -648,18 +654,18 @@ done
|
||||||
# Concatenating string
|
# Concatenating string
|
||||||
backup_str="BACKUP='$user.$DATE.tar'"
|
backup_str="BACKUP='$user.$DATE.tar'"
|
||||||
backup_str="$backup_str TYPE='$BACKUP_SYSTEM' SIZE='$size'"
|
backup_str="$backup_str TYPE='$BACKUP_SYSTEM' SIZE='$size'"
|
||||||
backup_str="$backup_str VESTA='yes'"
|
|
||||||
backup_str="$backup_str WEB='${web_list// /,}'"
|
backup_str="$backup_str WEB='${web_list// /,}'"
|
||||||
backup_str="$backup_str DNS='${dns_list// /,}'"
|
backup_str="$backup_str DNS='${dns_list// /,}'"
|
||||||
backup_str="$backup_str MAIL='${mail_list// /,}'"
|
backup_str="$backup_str MAIL='${mail_list// /,}'"
|
||||||
backup_str="$backup_str DB='${db_list// /,}'"
|
backup_str="$backup_str DB='${db_list// /,}'"
|
||||||
backup_str="$backup_str CRON='$cron_list'"
|
backup_str="$backup_str CRON='$cron_list'"
|
||||||
|
backup_str="$backup_str UDIR='${udir_list// /,}'"
|
||||||
backup_str="$backup_str RUNTIME='$run_time' TIME='$TIME' DATE='$DATE'"
|
backup_str="$backup_str RUNTIME='$run_time' TIME='$TIME' DATE='$DATE'"
|
||||||
echo "$backup_str" >> $USER_DATA/backup.conf
|
echo "$backup_str" >> $USER_DATA/backup.conf
|
||||||
chmod 660 $USER_DATA/backup.conf
|
chmod 660 $USER_DATA/backup.conf
|
||||||
|
|
||||||
# Clean backup queue
|
# Clean backup queue
|
||||||
sed -i "/ $user /d" $VESTA/data/queue/backup.pipe
|
sed -i "/v-backup-user $user /d" $VESTA/data/queue/backup.pipe
|
||||||
|
|
||||||
# Send notification
|
# Send notification
|
||||||
if [ "$notify" != 'no' ]; then
|
if [ "$notify" != 'no' ]; then
|
||||||
|
|
|
@ -88,8 +88,8 @@ is_object_valid 'backup' 'BACKUP' "$backup"
|
||||||
# Defining config and fields to select
|
# Defining config and fields to select
|
||||||
conf=$USER_DATA/backup.conf
|
conf=$USER_DATA/backup.conf
|
||||||
|
|
||||||
fields="\$BACKUP \$TYPE \$SIZE \$VESTA \$PAM \$WEB \$DNS \$DB"
|
fields="\$BACKUP \$TYPE \$SIZE \$WEB \$DNS \$DB \$MAIL \$CRON \$UDIR"
|
||||||
fields="$fields \$MAIL \$CRON \$RUNTIME \$TIME \$DATE"
|
fields="$fields \$RUNTIME \$TIME \$DATE"
|
||||||
|
|
||||||
# Listing backup
|
# Listing backup
|
||||||
case $format in
|
case $format in
|
||||||
|
|
|
@ -36,8 +36,8 @@ if [ ! -e "$conf" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Defining fileds to select
|
# Defining fileds to select
|
||||||
fields="\$BACKUP \$TYPE \$SIZE \$VESTA \$PAM \$WEB \$DNS \$DB"
|
fields="\$BACKUP \$TYPE \$SIZE \$WEB \$DNS \$DB \$MAIL \$CRON \$UDIR"
|
||||||
fields="$fields \$MAIL \$CRON \$RUNTIME \$TIME \$DATE"
|
fields="$fields \$RUNTIME \$TIME \$DATE"
|
||||||
|
|
||||||
# Listing domains
|
# Listing domains
|
||||||
case $format in
|
case $format in
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# info: restore user
|
# info: restore user
|
||||||
# options: USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIRS] [NOTIFY]
|
# options: USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR] [NOTIFY]
|
||||||
#
|
#
|
||||||
# The function for resotring user from backup.
|
# The function for resotring user from backup.
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ dns=$4
|
||||||
mail=$5
|
mail=$5
|
||||||
db=$6
|
db=$6
|
||||||
cron=$7
|
cron=$7
|
||||||
u_dirs=$8
|
udir=$8
|
||||||
notify=${9-no}
|
notify=${9-no}
|
||||||
|
|
||||||
# Define backup dir
|
# Define backup dir
|
||||||
|
@ -47,7 +47,7 @@ is_backup_valid() {
|
||||||
# Verifications #
|
# Verifications #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
args='USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIRS] [NOTIFY]'
|
args='USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR] [NOTIFY]'
|
||||||
check_args '2' "$#" $args
|
check_args '2' "$#" $args
|
||||||
validate_format 'user' 'backup'
|
validate_format 'user' 'backup'
|
||||||
is_object_valid 'user' 'USER' "$user"
|
is_object_valid 'user' 'USER' "$user"
|
||||||
|
@ -574,7 +574,7 @@ if [ "$cron" != 'no' ]; then
|
||||||
echo -e "$(date "+%F %T") $db"
|
echo -e "$(date "+%F %T") $db"
|
||||||
msg="$msg\n$(date "+%F %T") $db"
|
msg="$msg\n$(date "+%F %T") $db"
|
||||||
|
|
||||||
# unpack db container
|
# unpack cron container
|
||||||
tar xf $BACKUP/$backup -C $tmpdir ./cron
|
tar xf $BACKUP/$backup -C $tmpdir ./cron
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "Error: can't unpack cron contaner"
|
echo "Error: can't unpack cron contaner"
|
||||||
|
@ -593,9 +593,68 @@ if [ "$cron" != 'no' ]; then
|
||||||
msg="$msg\n"
|
msg="$msg\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Restore user directories
|
||||||
|
if [ "$udir" != 'no' ]; then
|
||||||
|
echo "-- USER DIR --"
|
||||||
|
msg="$msg\n-- USER DIR --"
|
||||||
|
|
||||||
|
# unpack user dir container
|
||||||
|
if [ ! -z "$(tar -tf $BACKUP/$backup |grep './user_dir')" ]; then
|
||||||
|
|
||||||
|
# Create user dir list
|
||||||
|
udir_list=$(tar -tf $BACKUP/$backup | grep "^./user_dir" |\
|
||||||
|
grep tar.gz | cut -f 3 -d '/' | sed -e "s/.tar.gz//")
|
||||||
|
|
||||||
|
if [ ! -z "$udir" ]; then
|
||||||
|
udir_include_list=$(mktemp)
|
||||||
|
for udir_include in ${udir//,/ }; do
|
||||||
|
echo "^$udir_include$" >> $udir_include_list
|
||||||
|
done
|
||||||
|
udir_list=$(echo "$udir_list" | egrep -f $udir_include_list )
|
||||||
|
rm -f $udir_include_list
|
||||||
|
fi
|
||||||
|
|
||||||
|
for user_dir in $udir_list; do
|
||||||
|
echo -e "$(date "+%F %T") $user_dir"
|
||||||
|
msg="$msg\n$(date "+%F %T") $user_dir"
|
||||||
|
|
||||||
|
# unpack user_dir container
|
||||||
|
tar xf $BACKUP/$backup -C $tmpdir ./user_dir/$user_dir.tar.gz
|
||||||
|
if [ "$?" -ne 0 ]; then
|
||||||
|
echo "Error: can't unpack $user_dir user dir contaner"
|
||||||
|
echo "Can't unpack $user_dir user dir contaner" |\
|
||||||
|
$send_mail -s "$subj" $email
|
||||||
|
rm -rf $tmpdir
|
||||||
|
exit $E_PARSING
|
||||||
|
fi
|
||||||
|
|
||||||
|
tar xzf $tmpdir/user_dir/$user_dir.tar.gz -C $HOMEDIR/$user
|
||||||
|
if [ "$?" -ne 0 ]; then
|
||||||
|
echo "Error: can't unpack $user_dir user dir contaner"
|
||||||
|
echo "Can't unpack $user_dir user dir contaner" |\
|
||||||
|
$send_mail -s "$subj" $email
|
||||||
|
rm -rf $tmpdir
|
||||||
|
exit $E_PARSING
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
msg="$msg\n"
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove temporary data
|
# Remove temporary data
|
||||||
rm -rf $tmpdir
|
rm -rf $tmpdir
|
||||||
|
|
||||||
|
# Clean restore queue
|
||||||
|
sed -i "/v-restore-user $user /d" $VESTA/data/queue/backup.pipe
|
||||||
|
|
||||||
|
# Send notification
|
||||||
|
if [ "$notify" != 'no' ]; then
|
||||||
|
subj="$user → restore has been completed"
|
||||||
|
email=$(get_user_value '$CONTACT')
|
||||||
|
echo -e "$msg" | $send_mail -s "$subj" $email
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Vesta #
|
# Vesta #
|
||||||
|
|
|
@ -26,14 +26,14 @@ validate_format 'user'
|
||||||
is_system_enabled "$BACKUP_SYSTEM"
|
is_system_enabled "$BACKUP_SYSTEM"
|
||||||
is_object_valid 'user' 'USER' "$user"
|
is_object_valid 'user' 'USER' "$user"
|
||||||
is_backup_enabled
|
is_backup_enabled
|
||||||
is_backup_scheduled
|
is_backup_scheduled 'backup'
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Action #
|
# Action #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Adding backup to pipe
|
# Adding backup task to the queue
|
||||||
echo "$BIN/v-backup-user $user yes" >> $VESTA/data/queue/backup.pipe
|
echo "$BIN/v-backup-user $user yes" >> $VESTA/data/queue/backup.pipe
|
||||||
|
|
||||||
|
|
56
bin/v-schedule-user-restore
Executable file
56
bin/v-schedule-user-restore
Executable file
|
@ -0,0 +1,56 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# info: schedule user backup restoration
|
||||||
|
# options: USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR]
|
||||||
|
#
|
||||||
|
# The function for scheduling user backup restoration.
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
# Variable&Function #
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
# Argument defenition
|
||||||
|
user=$1
|
||||||
|
backup=$2
|
||||||
|
web=$3
|
||||||
|
dns=$4
|
||||||
|
mail=$5
|
||||||
|
db=$6
|
||||||
|
cron=$7
|
||||||
|
udir=$8
|
||||||
|
|
||||||
|
# Includes
|
||||||
|
source $VESTA/conf/vesta.conf
|
||||||
|
source $VESTA/func/main.sh
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
# Verifications #
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
check_args '2' "$#" 'USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR]'
|
||||||
|
validate_format 'user'
|
||||||
|
is_system_enabled "$BACKUP_SYSTEM"
|
||||||
|
is_object_valid 'user' 'USER' "$user"
|
||||||
|
is_backup_enabled
|
||||||
|
is_backup_scheduled 'restore'
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
# Action #
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
# Adding restore task to the queue
|
||||||
|
options="'$web' '$dns' '$mail' '$db' '$cron' '$udir'"
|
||||||
|
echo "$BIN/v-restore-user $user $backup $options yes" \
|
||||||
|
>> $VESTA/data/queue/backup.pipe
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
# Vesta #
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
# Logging
|
||||||
|
log_event "$OK" "$EVENT"
|
||||||
|
|
||||||
|
exit
|
|
@ -161,9 +161,9 @@ is_backup_enabled() {
|
||||||
# Check user backup settings
|
# Check user backup settings
|
||||||
is_backup_scheduled() {
|
is_backup_scheduled() {
|
||||||
if [ -e "$VESTA/data/queue/backup.pipe" ]; then
|
if [ -e "$VESTA/data/queue/backup.pipe" ]; then
|
||||||
check_backup=$(grep " $user " $VESTA/data/queue/backup.pipe)
|
check_q=$(grep " $user " $VESTA/data/queue/backup.pipe | grep $1)
|
||||||
if [ ! -z "$check_backup" ]; then
|
if [ ! -z "$check_q" ]; then
|
||||||
echo "Error: backup is already scheduled"
|
echo "Error: $1 is already scheduled"
|
||||||
log_event "$E_EXISTS" "$EVENT"
|
log_event "$E_EXISTS" "$EVENT"
|
||||||
exit $E_EXISTS
|
exit $E_EXISTS
|
||||||
fi
|
fi
|
||||||
|
|
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']);
|
|
@ -367,6 +367,9 @@ $LANG['en'] = array(
|
||||||
'IP address is in use' => 'IP address is in use',
|
'IP address is in use' => 'IP address is in use',
|
||||||
'BACKUP_SCHEDULED' => 'Task has been added to the queue. You will receive an email notification when your backup is ready for download.',
|
'BACKUP_SCHEDULED' => 'Task has been added to the queue. You will receive an email notification when your backup is ready for download.',
|
||||||
'BACKUP_EXISTS' => 'An existing backup is already running. Please wait for that backup to finish.',
|
'BACKUP_EXISTS' => 'An existing backup is already running. Please wait for that backup to finish.',
|
||||||
|
'RESTORE_SCHEDULED' => 'Task has been added to the queue. You will receive an email notification when your backup is ready for download.',
|
||||||
|
'RESTORE_EXISTS' => 'An existing restoration task is already running. Please wait for it to finish before launching it again.',
|
||||||
|
|
||||||
|
|
||||||
'Welcome to Vesta Control Panel' => 'Welcome to Vesta Control Panel',
|
'Welcome to Vesta Control Panel' => 'Welcome to Vesta Control Panel',
|
||||||
'MAIL_FROM' => 'Vesta Control Panel <noreply@%s>',
|
'MAIL_FROM' => 'Vesta Control Panel <noreply@%s>',
|
||||||
|
|
|
@ -366,6 +366,8 @@ $LANG['es'] = array(
|
||||||
'IP address is in use' => 'La IP esta en uso',
|
'IP address is in use' => 'La IP esta en uso',
|
||||||
'BACKUP_SCHEDULED' => "La tarea se ha añadido a la cola. Usted recibirá un correo de notificación cuando el respaldo de seguridad este listo para su descarga.",
|
'BACKUP_SCHEDULED' => "La tarea se ha añadido a la cola. Usted recibirá un correo de notificación cuando el respaldo de seguridad este listo para su descarga.",
|
||||||
'BACKUP_EXISTS' => "Se esta realizando una copia de seguridad en este momento.Por favor espere a que esta termine.",
|
'BACKUP_EXISTS' => "Se esta realizando una copia de seguridad en este momento.Por favor espere a que esta termine.",
|
||||||
|
'RESTORE_SCHEDULED' => "La tarea se ha añadido a la cola. Usted recibirá un correo de notificación cuando el respaldo de seguridad este listo para su descarga.",
|
||||||
|
'RESTORE_EXISTS' => "Una tarea se está ejecutando. Por favor espere a que esta termine.",
|
||||||
|
|
||||||
'Welcome to Vesta Control Panel' => 'Bienvenido al Panel de Control Vesta',
|
'Welcome to Vesta Control Panel' => 'Bienvenido al Panel de Control Vesta',
|
||||||
'MAIL_FROM' => 'Panel de Control Vesta <noreply@%s>',
|
'MAIL_FROM' => 'Panel de Control Vesta <noreply@%s>',
|
||||||
|
|
|
@ -368,6 +368,8 @@ $LANG['ru'] = array(
|
||||||
'IP address is in use' => 'IP адрес используется',
|
'IP address is in use' => 'IP адрес используется',
|
||||||
'BACKUP_SCHEDULED' => 'Задание успешно добавлено в очередь. После завершения вы получите полный отчет по почте.',
|
'BACKUP_SCHEDULED' => 'Задание успешно добавлено в очередь. После завершения вы получите полный отчет по почте.',
|
||||||
'BACKUP_EXISTS' => 'Резервное копирование уже выполняется, полжалуйста дождитесь окончания.',
|
'BACKUP_EXISTS' => 'Резервное копирование уже выполняется, полжалуйста дождитесь окончания.',
|
||||||
|
'RESTORE_SCHEDULED' => 'Задание успешно добавлено в очередь. После завершения вы получите полный отчет по почте.',
|
||||||
|
'RESTORE_EXISTS' => 'Задание уже выполняется, полжалуйста дождитесь окончания.',
|
||||||
|
|
||||||
'Welcome to Vesta Control Panel' => 'Добро пожаловать в панель управления Vesta',
|
'Welcome to Vesta Control Panel' => 'Добро пожаловать в панель управления Vesta',
|
||||||
'MAIL_FROM' => 'Vesta Control Panel <noreply@%s>',
|
'MAIL_FROM' => 'Vesta Control Panel <noreply@%s>',
|
||||||
|
|
|
@ -368,6 +368,8 @@ $LANG['ua'] = array(
|
||||||
'IP address is in use' => 'IP адреса використовується',
|
'IP address is in use' => 'IP адреса використовується',
|
||||||
'BACKUP_SCHEDULED' => 'Завдання успішно додано в чергу. Після завершення ви отримаєте повний звіт по пошті.',
|
'BACKUP_SCHEDULED' => 'Завдання успішно додано в чергу. Після завершення ви отримаєте повний звіт по пошті.',
|
||||||
'BACKUP_EXISTS' => 'Резервне копіювання вже виконується, будь-ласка дочекайтесь закінчення.',
|
'BACKUP_EXISTS' => 'Резервне копіювання вже виконується, будь-ласка дочекайтесь закінчення.',
|
||||||
|
'RESTORE_SCHEDULED' => 'Завдання успішно додано в чергу. Після завершення ви отримаєте повний звіт по пошті.',
|
||||||
|
'RESTORE_EXISTS' => 'Завдання вже виконується, будь-ласка дочекайтесь закінчення.',
|
||||||
|
|
||||||
'Welcome to Vesta Control Panel' => 'Вітаємо в панелі керування Vesta',
|
'Welcome to Vesta Control Panel' => 'Вітаємо в панелі керування Vesta',
|
||||||
'MAIL_FROM' => 'Vesta Control Panel <noreply@%s>',
|
'MAIL_FROM' => 'Vesta Control Panel <noreply@%s>',
|
||||||
|
|
|
@ -6,7 +6,7 @@ session_start();
|
||||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||||
|
|
||||||
$v_username = escapeshellarg($user);
|
$v_username = escapeshellarg($user);
|
||||||
exec (VESTA_CMD."v-add-user-backup ".$v_username, $output, $return_var);
|
exec (VESTA_CMD."v-schedule-user-backup ".$v_username, $output, $return_var);
|
||||||
if ($return_var == 0) {
|
if ($return_var == 0) {
|
||||||
$_SESSION['backup_msg'] = _('BACKUP_SCHEDULED');
|
$_SESSION['backup_msg'] = _('BACKUP_SCHEDULED');
|
||||||
} else {
|
} else {
|
40
web/schedule/restore/index.php
Normal file
40
web/schedule/restore/index.php
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
// Init
|
||||||
|
error_reporting(NULL);
|
||||||
|
ob_start();
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||||
|
|
||||||
|
$backup = escapeshellarg($_GET['backup']);
|
||||||
|
|
||||||
|
$web = 'no';
|
||||||
|
$dns = 'no';
|
||||||
|
$mail = 'no';
|
||||||
|
$db = 'no';
|
||||||
|
$cron = 'no';
|
||||||
|
$udir = 'no';
|
||||||
|
|
||||||
|
if ($_GET['type'] == 'web') $web = escapeshellarg($_GET['object']);
|
||||||
|
if ($_GET['type'] == 'dns') $dns = escapeshellarg($_GET['object']);
|
||||||
|
if ($_GET['type'] == 'mail') $mail = escapeshellarg($_GET['object']);
|
||||||
|
if ($_GET['type'] == 'db') $db = escapeshellarg($_GET['object']);
|
||||||
|
if ($_GET['type'] == 'cron') $cron = 'yes';
|
||||||
|
if ($_GET['type'] == 'udir') $udir = escapeshellarg($_GET['object']);
|
||||||
|
|
||||||
|
if (!empty($_GET['type'])) {
|
||||||
|
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=" . $_GET['backup']);
|
|
@ -2,7 +2,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 2px 0 0 6px">
|
<td style="padding: 2px 0 0 6px">
|
||||||
<div class="submenu-button-block">
|
<div class="submenu-button-block">
|
||||||
<button class="submenu-button" onclick="location.href='/add/backup/'"> <?php print _('Create Backup');?> </button>
|
<button class="submenu-button" onclick="location.href='/schedule/backup/'"> <?php print _('Create Backup');?> </button>
|
||||||
</div>
|
</div>
|
||||||
<div class="submenu-search-block">
|
<div class="submenu-search-block">
|
||||||
<form action="/search/" method="get">
|
<form action="/search/" method="get">
|
||||||
|
@ -14,8 +14,8 @@
|
||||||
<form action="/bulk/backup/" method="post" id="objects">
|
<form action="/bulk/backup/" method="post" id="objects">
|
||||||
<a class="submenu-select-link" href='javascript:checkedAll("objects");'> <?php print _('toggle all');?> </a>
|
<a class="submenu-select-link" href='javascript:checkedAll("objects");'> <?php print _('toggle all');?> </a>
|
||||||
<select class="submenu-select-dropdown" name="action">
|
<select class="submenu-select-dropdown" name="action">
|
||||||
<option><?php print _('apply to selected');?></option>
|
<option value=""><?php print _('apply to selected');?></option>
|
||||||
<option><?php print _('delete');?></option>
|
<option value="delete"><?php print _('delete');?></option>
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" name="ok" value="›" class="submenu-button" style="width: 36px;">
|
<input type="submit" name="ok" value="›" class="submenu-button" style="width: 36px;">
|
||||||
</div>
|
</div>
|
||||||
|
@ -61,11 +61,16 @@
|
||||||
$dns = _('no');
|
$dns = _('no');
|
||||||
$mail = _('no');
|
$mail = _('no');
|
||||||
$db = _('no');
|
$db = _('no');
|
||||||
|
$cron = _('no');
|
||||||
|
$udir = _('no');
|
||||||
|
|
||||||
if (!empty($data[$key]['WEB'])) $web = _('yes').' ¨';
|
if (!empty($data[$key]['WEB'])) $web = _('yes').' ¨';
|
||||||
if (!empty($data[$key]['DNS'])) $dns = _('yes').' ¨';
|
if (!empty($data[$key]['DNS'])) $dns = _('yes').' ¨';
|
||||||
if (!empty($data[$key]['MAIL'])) $mail = _('yes').' ¨';
|
if (!empty($data[$key]['MAIL'])) $mail = _('yes').' ¨';
|
||||||
if (!empty($data[$key]['DB'])) $db = _('yes').' ¨';
|
if (!empty($data[$key]['DB'])) $db = _('yes').' ¨';
|
||||||
|
if (!empty($data[$key]['CRON'])) $cron = _('yes').' ¨';
|
||||||
|
if (!empty($data[$key]['UDIR'])) $udir = _('yes').' ¨';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="data-row">
|
<tr class="data-row">
|
||||||
|
@ -127,16 +132,6 @@
|
||||||
</td>
|
</td>
|
||||||
<td style="vertical-align:top;" width="250">
|
<td style="vertical-align:top;" width="250">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
|
||||||
<td class="counter-name" width="48">
|
|
||||||
<?php print _('SYS');?>:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a class="counter-value" title="<?php echo $data[$key]['VESTA'] ?>">
|
|
||||||
<?php echo _($data[$key]['VESTA']) ?>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" width="48">
|
<td class="counter-name" width="48">
|
||||||
<?php print _('WEB');?>:
|
<?php print _('WEB');?>:
|
||||||
|
@ -157,10 +152,6 @@
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td rowspan=4 style="vertical-align:top;" width="300">
|
|
||||||
<table>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" width="48">
|
<td class="counter-name" width="48">
|
||||||
<?php print _('MAIL');?>:
|
<?php print _('MAIL');?>:
|
||||||
|
@ -171,8 +162,12 @@
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td rowspan=4 style="vertical-align:top;" width="300">
|
||||||
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" width="48">
|
<td class="counter-name" width="90">
|
||||||
<?php print _('DB');?>:
|
<?php print _('DB');?>:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -182,15 +177,26 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" width="48">
|
<td class="counter-name" width="90">
|
||||||
<?php print _('CRON');?>:
|
<?php print _('CRON');?>:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="counter-value" title="<?php echo $data[$key]['CRON'] ?>">
|
<a class="counter-value" title="<?php echo $data[$key]['CRON'] ?>">
|
||||||
<?php echo _($data[$key]['CRON']) ?>
|
<?php echo $cron ?>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="counter-name" width="90">
|
||||||
|
<?php print _('USER DIRS');?>:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a class="counter-value" title="<?php echo str_replace(',', ', ', $data[$key]['UDIR']) ?>">
|
||||||
|
<?php echo $udir ?>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 2px 0 0 6px">
|
<td style="padding: 2px 0 0 6px">
|
||||||
<div class="submenu-button-block">
|
<div class="submenu-button-block">
|
||||||
<button class="submenu-button" onclick="location.href='/add/backup/'"> <?php print _('Restore All');?> </button>
|
<button class="submenu-button" onclick="location.href='/schedule/restore/'"> <?php print _('Restore All');?> </button>
|
||||||
</div>
|
</div>
|
||||||
<div class="submenu-search-block">
|
<div class="submenu-search-block">
|
||||||
<form action="/search/" method="get">
|
<form action="/search/" method="get">
|
||||||
|
@ -11,16 +11,17 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="submenu-select-block">
|
<div class="submenu-select-block">
|
||||||
<form action="/bulk/backup/" method="post" id="objects">
|
<form action="/bulk/restore/" method="post" id="objects">
|
||||||
<a class="submenu-select-link" href='javascript:checkedAll("objects");'> <?php print _('toggle all');?> </a>
|
<a class="submenu-select-link" href='javascript:checkedAll("objects");'> <?php print _('toggle all');?> </a>
|
||||||
<select class="submenu-select-dropdown" name="action">
|
<select class="submenu-select-dropdown" name="action">
|
||||||
<option><?php print _('apply to selected');?></option>
|
<option value=""><?php print _('apply to selected');?></option>
|
||||||
<option><?php print _('delete');?></option>
|
<option value="restore"><?php print _('restore');?></option>
|
||||||
</select>
|
</select>
|
||||||
|
<input type="hidden" name="backup" value="<?php echo $_GET['backup'] ?>">
|
||||||
<input type="submit" name="ok" value="›" class="submenu-button" style="width: 36px;">
|
<input type="submit" name="ok" value="›" class="submenu-button" style="width: 36px;">
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($_SESSION['backup_msg'])) {
|
if (!empty($_SESSION['restore_msg'])) {
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -37,11 +38,11 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<div id="dialog-message" title="<?php print _('Backup System') ?>">
|
<div id="dialog-message" title="<?php print _('Backup System') ?>">
|
||||||
<p><?php echo $_SESSION['backup_msg'] ?></p>
|
<p><?php echo $_SESSION['restore_msg'] ?></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
unset($_SESSION['backup_msg']);
|
unset($_SESSION['restore_msg']);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
@ -63,55 +64,22 @@
|
||||||
<div style="height:10px; font-size:0;"></div>
|
<div style="height:10px; font-size:0;"></div>
|
||||||
<table class="data">
|
<table class="data">
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$backup = $_GET['backup'];
|
$backup = $_GET['backup'];
|
||||||
if (!empty($data[$backup]['VESTA'])) {
|
|
||||||
?>
|
|
||||||
|
|
||||||
<tr class="data-row">
|
|
||||||
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
|
|
||||||
<table class="data-col1">
|
|
||||||
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="backup[]" value="<?php echo $key ?>" ></td></tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td class="data-dotted" width="830px" style="vertical-align:top;">
|
|
||||||
<a href="#" id="restore_link_<?php echo "$i"?>" class="data-controls">
|
|
||||||
<span>
|
|
||||||
<img src="/images/restore.png" width="6px" height="8px">
|
|
||||||
<?php print _('restore');?>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
<table class="data-col2" width="830px">
|
|
||||||
<tr>
|
|
||||||
<td class="cron" style="width: 170px; font-size: 14px;">
|
|
||||||
<?php echo _('sys') ?>
|
|
||||||
</td>
|
|
||||||
<td class="domain" style="padding: 0 0 0 4px;">
|
|
||||||
<b><?php echo _('user data') ?></b>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$web = explode(',',$data[$backup]['WEB']);
|
$web = explode(',',$data[$backup]['WEB']);
|
||||||
foreach ($web as $key) {
|
foreach ($web as $key) {
|
||||||
|
if (!empty($key)) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="data-row">
|
<tr class="data-row">
|
||||||
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
|
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
|
||||||
<table class="data-col1">
|
<table class="data-col1">
|
||||||
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="backup[]" value="<?php echo $key ?>" ></td></tr>
|
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="web[]" value="<?php echo $key ?>" ></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td class="data-dotted" width="830px" style="vertical-align:top;">
|
<td class="data-dotted" width="830px" style="vertical-align:top;">
|
||||||
<a href="#" id="restore_link_<?php echo "$i"?>" class="data-controls">
|
<a href="/schedule/restore/?backup=<?php echo $backup ?>&type=web&object=<?php echo $key ?>" class="data-controls">
|
||||||
<span>
|
<span>
|
||||||
<img src="/images/restore.png" width="6px" height="8px">
|
<img src="/images/restore.png" width="6px" height="8px">
|
||||||
<?php print _('restore');?>
|
<?php print _('restore');?>
|
||||||
|
@ -120,7 +88,7 @@
|
||||||
<table class="data-col2" width="830px">
|
<table class="data-col2" width="830px">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="cron" style="width: 170px; font-size: 14px;">
|
<td class="cron" style="width: 170px; font-size: 14px;">
|
||||||
<?php echo 'web ' . _('domain') ?>
|
<?php echo 'web ' . _('domain') ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="domain" style="padding: 0 0 0 4px;">
|
<td class="domain" style="padding: 0 0 0 4px;">
|
||||||
<b><?php echo $key ?></b>
|
<b><?php echo $key ?></b>
|
||||||
|
@ -131,22 +99,24 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$dns = explode(',',$data[$backup]['DNS']);
|
$dns = explode(',',$data[$backup]['DNS']);
|
||||||
foreach ($dns as $key) {
|
foreach ($dns as $key) {
|
||||||
|
if (!empty($key)) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="data-row">
|
<tr class="data-row">
|
||||||
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
|
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
|
||||||
<table class="data-col1">
|
<table class="data-col1">
|
||||||
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="backup[]" value="<?php echo $key ?>" ></td></tr>
|
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="dns[]" value="<?php echo $key ?>" ></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td class="data-dotted" width="830px" style="vertical-align:top;">
|
<td class="data-dotted" width="830px" style="vertical-align:top;">
|
||||||
<a href="#" id="restore_link_<?php echo "$i"?>" class="data-controls">
|
<a href="/schedule/restore/?backup=<?php echo $backup ?>&type=dns&object=<?php echo $key ?>" class="data-controls">
|
||||||
<span>
|
<span>
|
||||||
<img src="/images/restore.png" width="6px" height="8px">
|
<img src="/images/restore.png" width="6px" height="8px">
|
||||||
<?php print _('restore');?>
|
<?php print _('restore');?>
|
||||||
|
@ -166,22 +136,24 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$mail = explode(',',$data[$backup]['MAIL']);
|
$mail = explode(',',$data[$backup]['MAIL']);
|
||||||
foreach ($mail as $key) {
|
foreach ($mail as $key) {
|
||||||
|
if (!empty($key)) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="data-row">
|
<tr class="data-row">
|
||||||
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
|
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
|
||||||
<table class="data-col1">
|
<table class="data-col1">
|
||||||
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="backup[]" value="<?php echo $key ?>" ></td></tr>
|
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="mail[]" value="<?php echo $key ?>" ></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td class="data-dotted" width="830px" style="vertical-align:top;">
|
<td class="data-dotted" width="830px" style="vertical-align:top;">
|
||||||
<a href="#" id="restore_link_<?php echo "$i"?>" class="data-controls">
|
<a href="/schedule/restore/?backup=<?php echo $backup ?>&type=mail&object=<?php echo $key ?>" class="data-controls">
|
||||||
<span>
|
<span>
|
||||||
<img src="/images/restore.png" width="6px" height="8px">
|
<img src="/images/restore.png" width="6px" height="8px">
|
||||||
<?php print _('restore');?>
|
<?php print _('restore');?>
|
||||||
|
@ -201,22 +173,24 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$db = explode(',',$data[$backup]['DB']);
|
$db = explode(',',$data[$backup]['DB']);
|
||||||
foreach ($db as $key) {
|
foreach ($db as $key) {
|
||||||
|
if (!empty($key)) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="data-row">
|
<tr class="data-row">
|
||||||
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
|
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
|
||||||
<table class="data-col1">
|
<table class="data-col1">
|
||||||
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="backup[]" value="<?php echo $key ?>" ></td></tr>
|
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="db[]" value="<?php echo $key ?>" ></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td class="data-dotted" width="830px" style="vertical-align:top;">
|
<td class="data-dotted" width="830px" style="vertical-align:top;">
|
||||||
<a href="#" id="restore_link_<?php echo "$i"?>" class="data-controls">
|
<a href="/schedule/restore/?backup=<?php echo $backup ?>&type=db&object=<?php echo $key ?>" class="data-controls">
|
||||||
<span>
|
<span>
|
||||||
<img src="/images/restore.png" width="6px" height="8px">
|
<img src="/images/restore.png" width="6px" height="8px">
|
||||||
<?php print _('restore');?>
|
<?php print _('restore');?>
|
||||||
|
@ -236,22 +210,24 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$backup = $_GET['backup'];
|
$backup = $_GET['backup'];
|
||||||
if (!empty($data[$backup]['CRON'])) {
|
if (!empty($data[$backup]['CRON'])) {
|
||||||
|
if (!empty($key)) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="data-row">
|
<tr class="data-row">
|
||||||
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
|
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
|
||||||
<table class="data-col1">
|
<table class="data-col1">
|
||||||
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="backup[]" value="<?php echo $key ?>" ></td></tr>
|
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="cron[]" value="<?php echo 'yes' ?>" ></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td class="data-dotted" width="830px" style="vertical-align:top;">
|
<td class="data-dotted" width="830px" style="vertical-align:top;">
|
||||||
<a href="#" id="restore_link_<?php echo "$i"?>" class="data-controls">
|
<a href="/schedule/restore/?backup=<?php echo $backup ?>&type=cron&object=records" class="data-controls">
|
||||||
<span>
|
<span>
|
||||||
<img src="/images/restore.png" width="6px" height="8px">
|
<img src="/images/restore.png" width="6px" height="8px">
|
||||||
<?php print _('restore');?>
|
<?php print _('restore');?>
|
||||||
|
@ -271,6 +247,44 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$udir = explode(',',$data[$backup]['UDIR']);
|
||||||
|
foreach ($udir as $key) {
|
||||||
|
if (!empty($key)) {
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr class="data-row">
|
||||||
|
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
|
||||||
|
<table class="data-col1">
|
||||||
|
<tr><td style="padding: 18 0 4 18;"><input type="checkbox" name="udir[]" value="<?php echo $key ?>" ></td></tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td class="data-dotted" width="830px" style="vertical-align:top;">
|
||||||
|
<a href="/schedule/restore/?backup=<?php echo $backup ?>&type=udir&object=<?php echo $key ?>" class="data-controls">
|
||||||
|
<span>
|
||||||
|
<img src="/images/restore.png" width="6px" height="8px">
|
||||||
|
<?php print _('restore');?>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
<table class="data-col2" width="830px">
|
||||||
|
<tr>
|
||||||
|
<td class="cron" style="width: 170px; font-size: 14px;">
|
||||||
|
<?php echo _('user dir') ?>
|
||||||
|
</td>
|
||||||
|
<td class="domain" style="padding: 0 0 0 4px;">
|
||||||
|
<b><?php echo $key ?></b>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue