mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 10:37:39 -07:00
backup restoration 90% completed
This commit is contained in:
parent
1155e9065e
commit
65db51189c
16 changed files with 330 additions and 99 deletions
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
|
Loading…
Add table
Add a link
Reference in a new issue